Add extra JsonPartialWildcardMatcher Tests (#1267)

* Add extra JsonPartialWildcardMatcher Tests

* responseText.Should().Contain
This commit is contained in:
Stef Heyenrath authored and GitHub committed 2025-04-02 08:57:44 +02:00
1 parent db158bcc7e
commit 5abb424d3c
3 files changed
+76 -24

No files matched your search

@@ -37,13 +37,14 @@ public partial class Request
/// <inheritdoc />
public IRequestBuilder WithBodyAsJson(object body, MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch)
{
return WithBody(new IMatcher[] { new JsonMatcher(matchBehaviour, body) });
var matcher = body as IMatcher ?? new JsonMatcher(matchBehaviour, body);
return WithBody([matcher]);
}
/// <inheritdoc />
public IRequestBuilder WithBody(IMatcher matcher)
{
return WithBody(new[] { matcher });
return WithBody([matcher]);
}
/// <inheritdoc />