This commit is contained in:
Jochen Stärk
2020-02-16 18:41:10 +01:00
parent 06651c0903
commit 56484ae524
5 changed files with 40 additions and 5 deletions

View File

@@ -22,6 +22,8 @@ import junit.framework.TestCase;
import java.math.BigDecimal;
import org.mustangproject.ZUGFeRD.MustangReaderTestCase.Item;
public abstract class MustangReaderTestCase extends TestCase implements IZUGFeRDExportableTransaction {
public MustangReaderTestCase(String testName) {
@@ -134,6 +136,11 @@ public abstract class MustangReaderTestCase extends TestCase implements IZUGFeRD
private BigDecimal price, quantity;
private IZUGFeRDExportableProduct product;
private String addReference=null;
public String getAdditionalReferencedDocumentID() {
return addReference;
}
@Override
public BigDecimal getPrice() {
@@ -172,6 +179,15 @@ public abstract class MustangReaderTestCase extends TestCase implements IZUGFeRD
return null;
}
public String getAddReference() {
return addReference;
}
public void setAddReference(String addReference) {
this.addReference = addReference;
}
}
protected class Product implements IZUGFeRDExportableProduct {

View File

@@ -30,6 +30,7 @@ import java.util.GregorianCalendar;
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
import org.mustangproject.ZUGFeRD.MustangReaderTestCase.Item;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -202,7 +203,9 @@ public class ZF2EdgeTest extends MustangReaderTestCase implements IZUGFeRDExport
// 103
EdgeProduct airProduct = new EdgeProduct("", "Heiße Luft pro Liter", "LTR");
allItems[0] = new Item(new BigDecimal("160"), new BigDecimal("1"), designProduct);
Item design=new Item(new BigDecimal("160"), new BigDecimal("1"), designProduct);
design.setAddReference("1825");
allItems[0] = design;
allItems[1] = new Item(new BigDecimal("0.79"), new BigDecimal("400"), balloonProduct);
allItems[2] = new Item(new BigDecimal("0.10"), new BigDecimal("200"), airProduct);
return allItems;