Fix JsonMatcher and JsonPathMatcher

This commit is contained in:
Stef Heyenrath
2018-08-07 19:27:10 +02:00
parent f13b829c00
commit 4f7259d27a
5 changed files with 46 additions and 14 deletions

View File

@@ -142,11 +142,11 @@ namespace WireMock.Net.ConsoleApplication
.WithBodyFromFile(@"c:\temp\x.json")
);
server
.Given(Request.Create().WithPath("/file_rel").UsingGet())
.RespondWith(Response.Create()
.WithBodyFromFile("Program.cs", false)
);
//server
// .Given(Request.Create().WithPath("/file_rel").UsingGet())
// .RespondWith(Response.Create()
// .WithBodyFromFile("Program.cs", false)
// );
server
.Given(Request.Create().WithHeader("ProxyThis", "true")
@@ -176,13 +176,13 @@ namespace WireMock.Net.ConsoleApplication
.WithStatusCode(200)
.WithBody("hi"));
server
.Given(Request.Create().WithPath(p => p.Contains("x")).UsingGet())
.AtPriority(4)
.RespondWith(Response.Create()
.WithStatusCode(200)
.WithHeader("Content-Type", "application/json")
.WithBody(@"{ ""result"": ""Contains x with FUNC 200""}"));
//server
// .Given(Request.Create().WithPath(p => p.Contains("x")).UsingGet())
// .AtPriority(4)
// .RespondWith(Response.Create()
// .WithStatusCode(200)
// .WithHeader("Content-Type", "application/json")
// .WithBody(@"{ ""result"": ""Contains x with FUNC 200""}"));
server
.Given(Request.Create().WithPath("/data").UsingPost().WithBody(b => b.Contains("e")))