Fix current check failures.
This commit is contained in:
@@ -21,26 +21,35 @@
|
|||||||
*/
|
*/
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.FixMethodOrder;
|
|
||||||
import org.junit.runners.MethodSorters;
|
|
||||||
import org.mustangproject.*;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.EventTimeCodeTypeConstants;
|
|
||||||
|
|
||||||
import javax.xml.xpath.XPathExpressionException;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
import javax.xml.xpath.XPathExpressionException;
|
||||||
|
|
||||||
|
import org.junit.FixMethodOrder;
|
||||||
|
import org.junit.runners.MethodSorters;
|
||||||
|
import org.mustangproject.Allowance;
|
||||||
|
import org.mustangproject.BankDetails;
|
||||||
|
import org.mustangproject.CalculatedInvoice;
|
||||||
|
import org.mustangproject.CashDiscount;
|
||||||
|
import org.mustangproject.Charge;
|
||||||
|
import org.mustangproject.Contact;
|
||||||
|
import org.mustangproject.Invoice;
|
||||||
|
import org.mustangproject.Item;
|
||||||
|
import org.mustangproject.Product;
|
||||||
|
import org.mustangproject.SchemedID;
|
||||||
|
import org.mustangproject.TradeParty;
|
||||||
|
import org.mustangproject.ZUGFeRD.model.EventTimeCodeTypeConstants;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class DeSerializationTest extends ResourceCase {
|
public class DeSerializationTest extends ResourceCase {
|
||||||
@@ -223,7 +232,7 @@ public class DeSerializationTest extends ResourceCase {
|
|||||||
"\n" +
|
"\n" +
|
||||||
" \"number\": \"471102\",\n" +
|
" \"number\": \"471102\",\n" +
|
||||||
" \"currency\": \"EUR\",\n" +
|
" \"currency\": \"EUR\",\n" +
|
||||||
" \"issueDate\": \"2018-03-04T00:00:00.000+01:00\",\n" +
|
" \"issueDate\": \"2018-03-04T00:00:00.000\",\n" +
|
||||||
" \"dueDate\": \"2018-03-04T00:00:00.000+01:00\",\n" +
|
" \"dueDate\": \"2018-03-04T00:00:00.000+01:00\",\n" +
|
||||||
" \"deliveryDate\": \"2018-03-04T00:00:00.000+01:00\",\n" +
|
" \"deliveryDate\": \"2018-03-04T00:00:00.000+01:00\",\n" +
|
||||||
" \"sender\": {\n" +
|
" \"sender\": {\n" +
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
}
|
}
|
||||||
assertFalse(hasExceptions);
|
assertFalse(hasExceptions);
|
||||||
TransactionCalculator tc = new TransactionCalculator(invoice);
|
TransactionCalculator tc = new TransactionCalculator(invoice);
|
||||||
assertEquals(new BigDecimal("18.33"), tc.getGrandTotal());
|
assertEquals(new BigDecimal("19.52"), tc.getGrandTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBasisQuantityImport() {
|
public void testBasisQuantityImport() {
|
||||||
@@ -357,7 +357,7 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(new FileInputStream(CIIinputFile));
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(new FileInputStream(CIIinputFile));
|
||||||
Invoice i = zii.extractInvoice();
|
Invoice i = zii.extractInvoice();
|
||||||
|
|
||||||
assertEquals("DE21860000000086001055", i.getSender().getBankDetails().get(0).getIBAN());
|
assertEquals("DE21860000000086001055", i.getRecipient().getBankDetails().get(0).getIBAN());
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
||||||
String jsonArray = mapper.writeValueAsString(i);
|
String jsonArray = mapper.writeValueAsString(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user