Write logging in case a Matcher throws an exception (#986)

* ThrowException

* ...

* .

* ...

* b

* fix test

* ...

* .

* sonar

* ft

* .

* fix tst
This commit is contained in:
Stef Heyenrath
2023-08-21 20:07:46 +02:00
committed by GitHub
parent 09a302baf2
commit 93c87845c2
88 changed files with 1266 additions and 1244 deletions

View File

@@ -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);