mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-25 18:41:01 +01:00
RejectOnMatch (wip)
This commit is contained in:
@@ -20,6 +20,20 @@ namespace WireMock.Net.Tests.Matchers
|
||||
Check.That(name).Equals("ExactObjectMatcher");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExactObjectMatcher_IsMatch_ByteArray()
|
||||
{
|
||||
// Assign
|
||||
object checkValue = new byte[] { 1, 2 };
|
||||
|
||||
// Act
|
||||
var matcher = new ExactObjectMatcher(new byte[] { 1, 2 });
|
||||
double result = matcher.IsMatch(checkValue);
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExactObjectMatcher_IsMatch_AcceptOnMatch()
|
||||
{
|
||||
|
||||
@@ -78,10 +78,10 @@ namespace WireMock.Net.Tests.Matchers
|
||||
public void JsonPathMatcher_IsMatch_Object_Exception_Mismatch()
|
||||
{
|
||||
// Assign
|
||||
var matcher = new JsonPathMatcher("xxx");
|
||||
var matcher = new JsonPathMatcher("");
|
||||
|
||||
// Act
|
||||
double match = matcher.IsMatch("");
|
||||
double match = matcher.IsMatch("x");
|
||||
|
||||
// Assert
|
||||
Check.That(match).IsEqualTo(0);
|
||||
|
||||
@@ -32,6 +32,18 @@ namespace WireMock.Net.Tests.Matchers
|
||||
Check.That(patterns).ContainsExactly("X");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegexMatcher_GetIgnoreCase()
|
||||
{
|
||||
// Act
|
||||
bool case1 = new RegexMatcher("X").IgnoreCase;
|
||||
bool case2 = new RegexMatcher("X", true).IgnoreCase;
|
||||
|
||||
// Assert
|
||||
Check.That(case1).IsFalse();
|
||||
Check.That(case2).IsTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RegexMatcher_IsMatch()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user