Add some more tests

This commit is contained in:
Stef Heyenrath
2018-03-14 21:24:20 +01:00
parent c2183ab40c
commit 15500a812c
10 changed files with 202 additions and 9 deletions

View File

@@ -104,15 +104,13 @@ namespace WireMock.Matchers.Request
{
if (requestMessage.Body != null)
{
var stringMatcher = Matcher as IStringMatcher;
if (stringMatcher != null)
if (Matcher is IStringMatcher stringMatcher)
{
return stringMatcher.IsMatch(requestMessage.Body);
}
}
var objectMatcher = Matcher as IObjectMatcher;
if (objectMatcher != null)
if (Matcher is IObjectMatcher objectMatcher)
{
if (requestMessage.BodyAsJson != null)
{