mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-23 16:58:27 +02:00
Add extra unit tests for PR #1278
This commit is contained in:
@@ -55,11 +55,23 @@ public class JmesPathMatcherTests
|
|||||||
public void JmesPathMatcher_IsMatch_NullString()
|
public void JmesPathMatcher_IsMatch_NullString()
|
||||||
{
|
{
|
||||||
// Assign
|
// Assign
|
||||||
string? s = null;
|
|
||||||
var matcher = new JmesPathMatcher("");
|
var matcher = new JmesPathMatcher("");
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
double match = matcher.IsMatch(s).Score;
|
double match = matcher.IsMatch(null).Score;
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
Check.That(match).IsEqualTo(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JmesPathMatcher_IsMatch_EmptyString()
|
||||||
|
{
|
||||||
|
// Assign
|
||||||
|
var matcher = new JmesPathMatcher("");
|
||||||
|
|
||||||
|
// Act
|
||||||
|
double match = matcher.IsMatch(string.Empty).Score;
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(match).IsEqualTo(0);
|
Check.That(match).IsEqualTo(0);
|
||||||
|
|||||||
@@ -55,11 +55,23 @@ public class JsonPathMatcherTests
|
|||||||
public void JsonPathMatcher_IsMatch_NullString()
|
public void JsonPathMatcher_IsMatch_NullString()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
string? s = null;
|
|
||||||
var matcher = new JsonPathMatcher("");
|
var matcher = new JsonPathMatcher("");
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
double match = matcher.IsMatch(s).Score;
|
double match = matcher.IsMatch(null).Score;
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
Check.That(match).IsEqualTo(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonPathMatcher_IsMatch_EmptyString()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var matcher = new JsonPathMatcher("");
|
||||||
|
|
||||||
|
// Act
|
||||||
|
double match = matcher.IsMatch(string.Empty).Score;
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Check.That(match).IsEqualTo(0);
|
Check.That(match).IsEqualTo(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user