mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-24 10:01:00 +01:00
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
namespace WireMock.Matchers;
|
|
|
|
/// <summary>
|
|
/// JsonPartialMatcher
|
|
/// </summary>
|
|
public class JsonPartialMatcher : AbstractJsonPartialMatcher
|
|
{
|
|
/// <inheritdoc />
|
|
public override string Name => nameof(JsonPartialMatcher);
|
|
|
|
/// <inheritdoc />
|
|
public JsonPartialMatcher(string value, bool ignoreCase = false, bool regex = false)
|
|
: base(value, ignoreCase, regex)
|
|
{
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public JsonPartialMatcher(object value, bool ignoreCase = false, bool regex = false)
|
|
: base(value, ignoreCase, regex)
|
|
{
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public JsonPartialMatcher(MatchBehaviour matchBehaviour, object value, bool ignoreCase = false, bool regex = false)
|
|
: base(matchBehaviour, value, ignoreCase, regex)
|
|
{
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override bool IsMatch(string value, string input)
|
|
{
|
|
var exactStringMatcher = new ExactMatcher(MatchBehaviour.AcceptOnMatch, IgnoreCase, MatchOperator.Or, value);
|
|
return exactStringMatcher.IsMatch(input).IsPerfect();
|
|
}
|
|
} |