mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-11-22 16:24:19 +01:00
Add LinqMatcher (#195)
* LinqMatcher * LinqMatcher : revert * LinqMatcher
This commit is contained in:
1 parent
28c4188a1b
commit
9f17948e9f
6 files changed
+320
No files matched your search
@@ -350,6 +350,14 @@ namespace WireMock.Net.ConsoleApplication
|
||||
.WithTransformer()
|
||||
);
|
||||
|
||||
// https://stackoverflow.com/questions/51985089/wiremock-request-matching-with-comparison-between-two-query-parameters
|
||||
server
|
||||
.Given(Request.Create().WithPath("/linq")
|
||||
.WithParam("from", new LinqMatcher("DateTime.Parse(it) > \"2018-03-01 00:00:00\"")))
|
||||
.RespondWith(Response.Create()
|
||||
.WithBody("linq match !!!")
|
||||
);
|
||||
|
||||
System.Console.WriteLine("Press any key to stop the server");
|
||||
System.Console.ReadKey();
|
||||
server.Stop();
|
||||
|
||||
Reference in new issue
Block a user