closes #709 (just added a test the issue resolved itself with #708)

This commit is contained in:
jstaerk
2025-01-27 12:18:28 +01:00
parent 16c6f22566
commit f575cccfbe
2 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
#705 #705
#707 #707
-#708 -#708
-#709
2.16.1 2.16.1
======= =======

View File

@@ -351,6 +351,7 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
byte[] fileA = null; byte[] fileA = null;
byte[] fileB = null; byte[] fileB = null;
boolean facturXFound=false;
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter("./target/testout-ZF2PushAttachments.pdf"); ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter("./target/testout-ZF2PushAttachments.pdf");
for (FileAttachment fa : zii.getFileAttachmentsPDF()) { for (FileAttachment fa : zii.getFileAttachmentsPDF()) {
@@ -358,17 +359,19 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
fileA = fa.getData(); fileA = fa.getData();
} else if (fa.getFilename().equals("two.pdf")) { } else if (fa.getFilename().equals("two.pdf")) {
fileB = fa.getData(); fileB = fa.getData();
} else if (fa.getFilename().equals("factur-x.xml")) {
facturXFound=true;
} }
} }
byte[] b = {12, 13}; // the sample data that was used to write the files byte[] b = {12, 13}; // the sample data that was used to write the files
assertTrue(facturXFound);
assertTrue(Arrays.equals(fileA, b)); assertTrue(Arrays.equals(fileA, b));
assertEquals(fileA.length, 2); assertEquals(fileA.length, 2);
assertTrue(Arrays.equals(fileB, b)); assertTrue(Arrays.equals(fileB, b));
assertEquals(fileB.length, 2); assertEquals(fileB.length, 2);
} }
public void testImportDebit() { public void testImportDebit() {
File CIIinputFile = getResourceAsFile("cii/minimalDebit.xml"); File CIIinputFile = getResourceAsFile("cii/minimalDebit.xml");
try { try {