WECLAPP-31713 Add PARTIAL_BILLING
Fix line ending problem in UTLTest Fix typo
This commit is contained in:
@@ -416,7 +416,7 @@ public interface IExportableTransaction {
|
||||
}
|
||||
|
||||
/**
|
||||
* get the ID of the prceding invoice, which is e.g. to be corrected if this is a correction
|
||||
* get the ID of the preceding invoice, which is e.g. to be corrected if this is a correction
|
||||
*
|
||||
* @return the ID of the document
|
||||
*/
|
||||
|
||||
@@ -23,4 +23,5 @@ public class DocumentCodeTypeConstants {
|
||||
public static final String CREDITNOTE = "381";
|
||||
public static final String DEBITNOTE = "84";
|
||||
public static final String CORRECTEDINVOICE = "384";
|
||||
public static final String PARTIAL_BILLING = "326";
|
||||
}
|
||||
|
||||
@@ -21,32 +21,32 @@
|
||||
*/
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
import org.mustangproject.CII.CIIToUBL;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
import org.mustangproject.CII.CIIToUBL;
|
||||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class UBLTest extends ResourceCase {
|
||||
|
||||
public void testUBLBasic() {
|
||||
|
||||
// the writing part
|
||||
CIIToUBL c2u = new CIIToUBL();
|
||||
String sourceFilename = "factur-x.xml";
|
||||
File input = getResourceAsFile(sourceFilename);
|
||||
File expectedFile = getResourceAsFile("ubl-conv-ubl-output-factur-x.xml");
|
||||
final CIIToUBL c2u = new CIIToUBL();
|
||||
final String sourceFilename = "factur-x.xml";
|
||||
final File input = getResourceAsFile(sourceFilename);
|
||||
final File expectedFile = getResourceAsFile("ubl-conv-ubl-output-factur-x.xml");
|
||||
String expected = null;
|
||||
String result = null;
|
||||
try {
|
||||
File tempFile = File.createTempFile("ZUGFeRD-UBL-", "-test");
|
||||
final File tempFile = File.createTempFile("ZUGFeRD-UBL-", "-test");
|
||||
c2u.convert(input, tempFile);
|
||||
expected = ResourceUtilities.readFile(StandardCharsets.UTF_8, expectedFile.getAbsolutePath());
|
||||
result = ResourceUtilities.readFile(StandardCharsets.UTF_8, tempFile.getAbsolutePath());
|
||||
} catch (IOException e) {
|
||||
result = ResourceUtilities.readFile(StandardCharsets.UTF_8, tempFile.getAbsolutePath()).replaceAll("\r\n", "\n");
|
||||
} catch (final IOException e) {
|
||||
fail("Exception should not happen: "+e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user