mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-23 09:15:06 +01:00
RejectOnMatch (wip)
This commit is contained in:
@@ -150,6 +150,14 @@ namespace WireMock.Net.ConsoleApplication
|
||||
.WithHeader("Content-Type", "application/json")
|
||||
.WithBody(@"{ ""result"": ""data deleted with 200""}"));
|
||||
|
||||
server
|
||||
.Given(Request.Create()
|
||||
.WithPath("/reject")
|
||||
.WithHeader("x", "1", MatchBehaviour.RejectOnMatch)
|
||||
.UsingAnyMethod())
|
||||
.RespondWith(Response.Create()
|
||||
.WithBody(@"{ ""result"": ""reject""}"));
|
||||
|
||||
server
|
||||
.Given(Request.Create().WithPath("/nobody").UsingGet())
|
||||
.RespondWith(Response.Create().WithDelay(TimeSpan.FromSeconds(1))
|
||||
|
||||
Reference in New Issue
Block a user