mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-23 00:38:28 +02:00
RejectOnMatch (wip)
This commit is contained in:
@@ -13,7 +13,7 @@ namespace WireMock.Net.Tests.Matchers
|
||||
var matcher = new SimMetricsMatcher("X");
|
||||
|
||||
// Act
|
||||
string name = matcher.GetName();
|
||||
string name = matcher.Name;
|
||||
|
||||
// Assert
|
||||
Check.That(name).Equals("SimMetricsMatcher.Levenstein");
|
||||
@@ -57,5 +57,31 @@ namespace WireMock.Net.Tests.Matchers
|
||||
// Assert
|
||||
Check.That(result).IsStrictlyLessThan(0.1).And.IsStrictlyGreaterThan(0.05);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SimMetricsMatcher_IsMatch_AcceptOnMatch()
|
||||
{
|
||||
// Assign
|
||||
var matcher = new SimMetricsMatcher("test");
|
||||
|
||||
// Act
|
||||
double result = matcher.IsMatch("test");
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SimMetricsMatcher_IsMatch_RejectOnMatch()
|
||||
{
|
||||
// Assign
|
||||
var matcher = new SimMetricsMatcher(MatchBehaviour.RejectOnMatch, "test");
|
||||
|
||||
// Act
|
||||
double result = matcher.IsMatch("test");
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user