attempt for new tests(which compile but do not yet even fail)
This commit is contained in:
@@ -33,6 +33,7 @@ public class Invoice implements IExportableTransaction {
|
||||
protected BigDecimal totalPrepaidAmount = null;
|
||||
protected IZUGFeRDExportableContact ownContact = null, recipient = null, deliveryAddress = null;
|
||||
protected ArrayList<IZUGFeRDExportableItem> ZFItems = null;
|
||||
protected String contractReferencedDocument = null;
|
||||
|
||||
protected ArrayList<IZUGFeRDAllowanceCharge> Allowances = new ArrayList<IZUGFeRDAllowanceCharge>(),
|
||||
Charges = new ArrayList<IZUGFeRDAllowanceCharge>(), LogisticsServiceCharges = new ArrayList<IZUGFeRDAllowanceCharge>();
|
||||
@@ -50,6 +51,8 @@ public class Invoice implements IExportableTransaction {
|
||||
return documentName;
|
||||
}
|
||||
|
||||
public String getContractReferencedDocument() { return contractReferencedDocument; }
|
||||
|
||||
public Invoice setDocumentName(String documentName) {
|
||||
this.documentName = documentName;
|
||||
return this;
|
||||
@@ -419,4 +422,9 @@ public class Invoice implements IExportableTransaction {
|
||||
Allowances.add(izac);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Invoice setContractReferencedDocument(String s) {
|
||||
contractReferencedDocument=s;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,10 @@ public interface IExportableTransaction {
|
||||
return null;
|
||||
}
|
||||
|
||||
default String getContractReferencedDocument() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* who processed the order
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ZF2PushTest extends TestCase {
|
||||
.setCreator(System.getProperty("user.name")).setZUGFeRDVersion(2).ignorePDFAErrors()
|
||||
.load(SOURCE_PDF)) {
|
||||
|
||||
ze.setTransaction(new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()).setOwnOrganisationName(orgname).setOwnStreet("teststr").setOwnZIP("55232").setOwnLocation("teststadt").setOwnCountry("DE").setOwnTaxID("4711").setOwnVATID("DE19990815").setRecipient(new Contact("Franz Müller", "0177123456", "fmueller@test.com", "teststr.12", "55232", "Entenhausen", "DE")).setNumber(number).addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(0)), amount, new BigDecimal(1.0))));
|
||||
ze.setTransaction(new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()).setContractReferencedDocument("0815").setOwnOrganisationName(orgname).setOwnStreet("teststr").setOwnZIP("55232").setOwnLocation("teststadt").setOwnCountry("DE").setOwnTaxID("4711").setOwnVATID("DE19990815").setRecipient(new Contact("Franz Müller", "0177123456", "fmueller@test.com", "teststr.12", "55232", "Entenhausen", "DE")).setNumber(number).addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(0)), amount, new BigDecimal(1.0))));
|
||||
String theXML = new String(ze.getProvider().getXML());
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||
ze.export(TARGET_PDF);
|
||||
@@ -63,6 +63,7 @@ public class ZF2PushTest extends TestCase {
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF);
|
||||
|
||||
assertTrue(zi.getUTF8().contains("EUR"));
|
||||
assertTrue(zi.getUTF8().contains("0815"));
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(amountStr, zi.getAmount());
|
||||
|
||||
Reference in New Issue
Block a user