Skip to content

Commit

Permalink
I don't know why those tests work now but thats better than having th…
Browse files Browse the repository at this point in the history
…em throw errors like before
  • Loading branch information
jstaerk committed May 22, 2024
1 parent e0773d7 commit f2a6165
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ public void testXR23Validation() {

assertThat(res).valueByXPath("count(//error)")
.asInt()
.isEqualTo(1);// incorrectly throws an error due to https://awv-git.de/einvoicing/factur-x/-/issues/69
.isEqualTo(0);

assertThat(res).valueByXPath("count(//notice)")
.asInt()
.isEqualTo(0);
assertThat(res).valueByXPath("/validation/summary/@status")
.asString()
.isEqualTo("invalid");// expect to be valid because XR notices are, well, only notices
.isEqualTo("valid");// expect to be valid because XR notices are, well, only notices
assertThat(res).valueByXPath("/validation/xml/summary/@status")
.asString()
.isEqualTo("invalid");
.isEqualTo("valid");


}
Expand All @@ -137,25 +137,25 @@ public void testXR30Validation() {
String res = zfv.validate(tempFile.getAbsolutePath());
assertThat(res).valueByXPath("count(//error)")
.asInt()
.isEqualTo(1);// incorrectly throws an error due to https://awv-git.de/einvoicing/factur-x/-/issues/69
.isEqualTo(0);

assertThat(res).valueByXPath("count(//notice)")
.asInt()
.isEqualTo(0);
assertThat(res).valueByXPath("/validation/summary/@status")
.asString()
.isEqualTo("invalid");// expect to be valid because XR notices are, well, only notices
.isEqualTo("valid");// expect to be valid because XR notices are, well, only notices
assertThat(res).valueByXPath("/validation/xml/summary/@status")
.asString()
.isEqualTo("invalid");
.isEqualTo("valid");

tempFile = getResourceAsFile("invalidXRV30.xml");
zfv = new ZUGFeRDValidator();
res = zfv.validate(tempFile.getAbsolutePath());

assertThat(res).valueByXPath("count(//error)")
.asInt()
.isEqualTo(4); //should be 3
.isEqualTo(3);

assertThat(res).valueByXPath("count(//notice)")
.asInt()
Expand Down

0 comments on commit f2a6165

Please sign in to comment.