mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-14 12:39:37 +02:00
Add some more tests
This commit is contained in:
@@ -20,15 +20,16 @@ namespace WireMock.Serialization
|
||||
return null;
|
||||
}
|
||||
|
||||
IStringMatcher stringMatcher = matcher as IStringMatcher;
|
||||
string[] patterns = stringMatcher != null ? stringMatcher.GetPatterns() : new string[0];
|
||||
string[] patterns = matcher is IStringMatcher stringMatcher ? stringMatcher.GetPatterns() : new string[0];
|
||||
bool? ignorecase = matcher is IIgnoreCaseMatcher ignoreCaseMatcher ? ignoreCaseMatcher.IgnoreCase : (bool?)null;
|
||||
|
||||
return new MatcherModel
|
||||
{
|
||||
IgnoreCase = ignorecase,
|
||||
Name = matcher.GetName(),
|
||||
Pattern = patterns.Length == 1 ? patterns.First() : null,
|
||||
Patterns = patterns.Length > 1 ? patterns : null
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user