diff --git a/test/WireMock.Net.Tests/Matchers/JmesPathMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/JmesPathMatcherTests.cs index 8dbcbc4f..01d6e522 100644 --- a/test/WireMock.Net.Tests/Matchers/JmesPathMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/JmesPathMatcherTests.cs @@ -55,11 +55,23 @@ public class JmesPathMatcherTests public void JmesPathMatcher_IsMatch_NullString() { // Assign - string? s = null; var matcher = new JmesPathMatcher(""); // 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 Check.That(match).IsEqualTo(0); diff --git a/test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs index 3612cabc..53aa8ecb 100644 --- a/test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs @@ -55,11 +55,23 @@ public class JsonPathMatcherTests public void JsonPathMatcher_IsMatch_NullString() { // Arrange - string? s = null; var matcher = new JsonPathMatcher(""); // 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 Check.That(match).IsEqualTo(0);