mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-23 10:44:55 +01:00
Support for partial JSON matching (#539)
* support Json partial match with JsonPartialMatcher * fix erroneous filenames * add newline * newlines fix * add JsonPartialMatcher to mapper * curly braces for ifs * fix JToken type comparison * more test cases * rename AreEqual -> IsMatch + more test cases * separate tests for JPath matcher values Co-authored-by: Gleb Osokin <gleb.osokin@avira.com>
This commit is contained in:
@@ -67,6 +67,10 @@ namespace WireMock.Serialization
|
||||
object value = matcher.Pattern ?? matcher.Patterns;
|
||||
return new JsonMatcher(matchBehaviour, value, ignoreCase, throwExceptionWhenMatcherFails);
|
||||
|
||||
case "JsonPartialMatcher":
|
||||
object matcherValue = matcher.Pattern ?? matcher.Patterns;
|
||||
return new JsonPartialMatcher(matchBehaviour, matcherValue, ignoreCase, throwExceptionWhenMatcherFails);
|
||||
|
||||
case "JsonPathMatcher":
|
||||
return new JsonPathMatcher(matchBehaviour, throwExceptionWhenMatcherFails, stringPatterns);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user