diff --git a/Request-Matching.md b/Request-Matching.md index b2d5fee..d688b39 100644 --- a/Request-Matching.md +++ b/Request-Matching.md @@ -23,7 +23,8 @@ At this moment these matchers are supported: * [RegexMatcher](https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#regular-expression-matching-regexmatcher) * [SimMetricsMatcher](https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#similarity-metric-matching-simmetricsmatcher) * [WildcardMatcher](https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#wildcardmatching-wildcardmatcher) -* [ContentTypeMatcher](todo) +* [ContentTypeMatcher](🚧) +* [NotNullOrEmptyMatcher](.) ## Exact matcher (ExactMatcher) Can be used to exactly match a string or object. @@ -325,7 +326,6 @@ The car drives in the street. Hello ``` - ### WildcardMatching (WildcardMatcher) WildcardMatching is mostly used for Path and Url matching. This matcher allows a ? for a single character and * for any characters. @@ -348,6 +348,10 @@ server .RespondWith(Response.Create().WithBody("Matched with *")); ``` +### NotNullOrEmptyMatcher +NotNullOrEmptyMatcher is used for Body matching. This matcher will return a match of the body is not null (BodyAsBytes, BodyAsJson, BodyAsString) or empty (BodyAsBytes, BodyAsString). + + ### Reversing the match behaviour with `MatchBehaviour.RejectOnMatch` The default behaviour for Matchers is MatchBehaviour.AcceptOnMatch so that when the matcher processes a request that corresponds with the matcher, the stubbed response is returned. In some scenarios you might want to reverse this behaviour so that the stubbed response is returned with the absence of a match.