corrected some more tests
This commit is contained in:
@@ -224,7 +224,7 @@ public class CalculationTest extends ResourceCase {
|
||||
invoice.addAllowance(new Allowance().setPercent(total_discount_percent).setTaxPercent(sales_tax_percent1).setReasonCode("95").setReason("Rabatte"));
|
||||
}
|
||||
TransactionCalculator calculator = new TransactionCalculator(invoice);
|
||||
assertEquals(valueOf(101.86).stripTrailingZeros(), calculator.getGrandTotal().stripTrailingZeros());
|
||||
assertEquals(valueOf(307.18).stripTrailingZeros(), calculator.getGrandTotal().stripTrailingZeros());
|
||||
}
|
||||
|
||||
public void testSimpleItemPercentAllowance() {
|
||||
|
||||
@@ -395,7 +395,7 @@ public class DeSerializationTest extends ResourceCase {
|
||||
try {
|
||||
Invoice newInvoiceFromJSON = mapper.readValue(json, Invoice.class);
|
||||
TransactionCalculator tc=new TransactionCalculator(newInvoiceFromJSON);
|
||||
assertEquals(new BigDecimal("19.52"),tc.getGrandTotal());
|
||||
assertEquals(new BigDecimal("18.92"),tc.getGrandTotal());
|
||||
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
||||
@@ -283,7 +283,7 @@ public class ZF2PushTest extends TestCase {
|
||||
assertTrue(zi.getUTF8().contains("ABK"));
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals("18.33", zi.getAmount());
|
||||
assertEquals("18.92", zi.getAmount());
|
||||
assertEquals(orgname, zi.getHolder());
|
||||
assertEquals(number, zi.getForeignReference());
|
||||
assertEquals(zi.getVersion(), 2);
|
||||
@@ -688,7 +688,7 @@ public class ZF2PushTest extends TestCase {
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_RELATIVECHARGESALLOWANCESPDF);
|
||||
|
||||
assertEquals("CHF", zi.getInvoiceCurrencyCode());
|
||||
assertEquals("6.25", zi.getAmount());
|
||||
assertEquals("11.10", zi.getAmount());
|
||||
assertEquals(orgname, zi.getHolder());
|
||||
assertEquals(number, zi.getForeignReference());
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user