Relative charges/allowances on document level

This commit is contained in:
Jochen Stärk
2020-10-08 14:51:33 +02:00
parent 66fd7b4316
commit 44c6509504
11 changed files with 131 additions and 41 deletions

View File

@@ -80,6 +80,25 @@ public class LibraryTest extends ResourceCase {
}
public void testLibraryPushRelativeAllowances() {
File tempFile = new File("../library/target/testout-ZF2PushRelativeChargesAllowances.pdf");
assertTrue(tempFile.exists());
ZUGFeRDValidator zfv = new ZUGFeRDValidator();
String res = zfv.validate(tempFile.getAbsolutePath());
assertThat(res).valueByXPath("/validation/pdf/summary/@status")
.isEqualTo("valid");
assertThat(res).valueByXPath("/validation/xml/summary/@status")
.isEqualTo("valid");
assertThat(res).valueByXPath("/validation/summary/@status")
.isEqualTo("valid");
}
public void testLibraryPushAllowances() {
File tempFile = new File("../library/target/testout-ZF2PushChargesAllowances.pdf");
assertTrue(tempFile.exists());

View File

@@ -64,6 +64,11 @@ public class ZUGFeRDValidatorTest extends ResourceCase {
assertThat(res).valueByXPath("/validation/summary/@status")
.isEqualTo("invalid");
zfv = new ZUGFeRDValidator();
res = zfv.validate("/does/not/exist");
assertThat(res).valueByXPath("/validation/summary/@status")
.isEqualTo("invalid");
}
/***