Fix local path issue

Replace local absolute path by resource
This commit is contained in:
Adrian-Devries
2024-12-19 19:21:28 +01:00
committed by GitHub
parent b8d283cef2
commit 07758fc26d

View File

@@ -807,12 +807,14 @@ public class ZF2PushTest extends TestCase {
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter("\\Users\\jstaerk\\temp\\1424413_anonymized.xml");
// ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter("\\Users\\jstaerk\\temp\\1424413_anonymized.xml");
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(this.getClass().getResourceAsStream("/factur-x.xml"));
try {
Invoice i = zii.extractInvoice();
TransactionCalculator tc=new TransactionCalculator(i);
assertEquals(0,tc.getGrandTotal().compareTo(new BigDecimal("442.83")));
// assertEquals(0,tc.getGrandTotal().compareTo(new BigDecimal("442.83")));
assertEquals(0,tc.getGrandTotal().compareTo(new BigDecimal("571.04")));
} catch (XPathExpressionException e) {
fail("XPathExpressionException should not be raised");