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

@@ -43,7 +43,7 @@ public class XPathMatcherTests
var matcher = new XPathMatcher("/todo-list[count(todo-item) = 1]");
// Act
double result = matcher.IsMatch(xml);
double result = matcher.IsMatch(xml).Score;
// Assert
Check.That(result).IsEqualTo(1.0);
@@ -57,10 +57,10 @@ public class XPathMatcherTests
<todo-list>
<todo-item id='a1'>abc</todo-item>
</todo-list>";
var matcher = new XPathMatcher(MatchBehaviour.RejectOnMatch, false, MatchOperator.Or, "/todo-list[count(todo-item) = 1]");
var matcher = new XPathMatcher(MatchBehaviour.RejectOnMatch, MatchOperator.Or, "/todo-list[count(todo-item) = 1]");
// Act
double result = matcher.IsMatch(xml);
double result = matcher.IsMatch(xml).Score;
// Assert
Check.That(result).IsEqualTo(0.0);