RejectOnMatch (wip)

This commit is contained in:
Stef Heyenrath
2018-05-04 08:16:42 +02:00
parent 0fb4b62b50
commit 8959e55ca3
5 changed files with 41 additions and 1 deletions

View File

@@ -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))