mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-25 02:09:06 +02:00
Write logging in case a Matcher throws an exception (#986)
* ThrowException * ... * . * ... * b * fix test * ... * . * sonar * ft * . * fix tst
This commit is contained in:
@@ -39,7 +39,7 @@ public class SimMetricsMatcherTests
|
||||
var matcher = new SimMetricsMatcher("The cat walks in the street.");
|
||||
|
||||
// Act
|
||||
double result = matcher.IsMatch("The car drives in the street.");
|
||||
double result = matcher.IsMatch("The car drives in the street.").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsStrictlyLessThan(1.0).And.IsStrictlyGreaterThan(0.5);
|
||||
@@ -52,7 +52,7 @@ public class SimMetricsMatcherTests
|
||||
var matcher = new SimMetricsMatcher("The cat walks in the street.");
|
||||
|
||||
// Act
|
||||
double result = matcher.IsMatch("Hello");
|
||||
double result = matcher.IsMatch("Hello").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsStrictlyLessThan(0.1).And.IsStrictlyGreaterThan(0.05);
|
||||
@@ -65,7 +65,7 @@ public class SimMetricsMatcherTests
|
||||
var matcher = new SimMetricsMatcher("test");
|
||||
|
||||
// Act
|
||||
double result = matcher.IsMatch("test");
|
||||
double result = matcher.IsMatch("test").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(1.0);
|
||||
@@ -78,7 +78,7 @@ public class SimMetricsMatcherTests
|
||||
var matcher = new SimMetricsMatcher(MatchBehaviour.RejectOnMatch, "test");
|
||||
|
||||
// Act
|
||||
double result = matcher.IsMatch("test");
|
||||
double result = matcher.IsMatch("test").Score;
|
||||
|
||||
// Assert
|
||||
Check.That(result).IsEqualTo(0.0);
|
||||
|
||||
Reference in New Issue
Block a user