JsonPartialMatcher - match guid and string (#972)

* JsonPartialMatcher - match guid and string (#971)

* JsonPartialMatcher - match guid and string. Add Regex with Guid test (#971)
This commit is contained in:
Tymur Nesterenko authored and GitHub committed 2023-07-19 22:34:02 +02:00
1 parent 9c51548d2b
commit 58bfb3ea33
2 files changed
+47

No files matched your search

@@ -74,6 +74,13 @@ public abstract class AbstractJsonPartialMatcher : JsonMatcher
}
}
if (input != null &&
((value.Type == JTokenType.Guid && input.Type == JTokenType.String) ||
(value.Type == JTokenType.String && input.Type == JTokenType.Guid)))
{
return IsMatch(value.ToString(), input.ToString());
}
if (input == null || value.Type != input.Type)
{
return false;