I don't know why those tests work now but thats better than having them throw errors like before
This commit is contained in:
@@ -115,17 +115,17 @@ public class ZUGFeRDValidatorTest extends ResourceCase {
|
|||||||
|
|
||||||
assertThat(res).valueByXPath("count(//error)")
|
assertThat(res).valueByXPath("count(//error)")
|
||||||
.asInt()
|
.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)")
|
assertThat(res).valueByXPath("count(//notice)")
|
||||||
.asInt()
|
.asInt()
|
||||||
.isEqualTo(0);
|
.isEqualTo(0);
|
||||||
assertThat(res).valueByXPath("/validation/summary/@status")
|
assertThat(res).valueByXPath("/validation/summary/@status")
|
||||||
.asString()
|
.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")
|
assertThat(res).valueByXPath("/validation/xml/summary/@status")
|
||||||
.asString()
|
.asString()
|
||||||
.isEqualTo("invalid");
|
.isEqualTo("valid");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -137,17 +137,17 @@ public class ZUGFeRDValidatorTest extends ResourceCase {
|
|||||||
String res = zfv.validate(tempFile.getAbsolutePath());
|
String res = zfv.validate(tempFile.getAbsolutePath());
|
||||||
assertThat(res).valueByXPath("count(//error)")
|
assertThat(res).valueByXPath("count(//error)")
|
||||||
.asInt()
|
.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)")
|
assertThat(res).valueByXPath("count(//notice)")
|
||||||
.asInt()
|
.asInt()
|
||||||
.isEqualTo(0);
|
.isEqualTo(0);
|
||||||
assertThat(res).valueByXPath("/validation/summary/@status")
|
assertThat(res).valueByXPath("/validation/summary/@status")
|
||||||
.asString()
|
.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")
|
assertThat(res).valueByXPath("/validation/xml/summary/@status")
|
||||||
.asString()
|
.asString()
|
||||||
.isEqualTo("invalid");
|
.isEqualTo("valid");
|
||||||
|
|
||||||
tempFile = getResourceAsFile("invalidXRV30.xml");
|
tempFile = getResourceAsFile("invalidXRV30.xml");
|
||||||
zfv = new ZUGFeRDValidator();
|
zfv = new ZUGFeRDValidator();
|
||||||
@@ -155,7 +155,7 @@ public class ZUGFeRDValidatorTest extends ResourceCase {
|
|||||||
|
|
||||||
assertThat(res).valueByXPath("count(//error)")
|
assertThat(res).valueByXPath("count(//error)")
|
||||||
.asInt()
|
.asInt()
|
||||||
.isEqualTo(4); //should be 3
|
.isEqualTo(3);
|
||||||
|
|
||||||
assertThat(res).valueByXPath("count(//notice)")
|
assertThat(res).valueByXPath("count(//notice)")
|
||||||
.asInt()
|
.asInt()
|
||||||
|
|||||||
Reference in New Issue
Block a user