diff --git a/Request-Matchers.md b/Request-Matchers.md index 2f12073..002c20c 100644 --- a/Request-Matchers.md +++ b/Request-Matchers.md @@ -8,6 +8,37 @@ WireMock supports matching of requests to stubs and verification queries using t * Cookies * Request Body +# Matchers +The following paragraphs describe in detail which matchers can be used. + +At this moment these matchers are supported: +* LinqMatcher +* ExactMatcher +* WildcardMatcher +* RegexMatcher +* XPathMatcher +* JsonMatcher +* JsonPathMatcher +* SimMetricsMatcher + +## Dynamic Linq (LinqMatcher) +Can be used to match an object using Dynamic Linq (https://github.com/StefH/System.Linq.Dynamic.Core) + +#### C# option +```csharp +var server = FluentMockServer.Start(); +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 !!!") + ); +``` + +#### JSON Mapping option +``` js +``` + ## JSON (JsonMatcher) Checks if a JSON object (or JSON as string) is DeepEqual.