Test fixes
This commit is contained in:
@@ -42,6 +42,7 @@ import org.apache.pdfbox.cos.COSDictionary;
|
|||||||
import org.apache.pdfbox.cos.COSName;
|
import org.apache.pdfbox.cos.COSName;
|
||||||
import org.apache.pdfbox.cos.COSObject;
|
import org.apache.pdfbox.cos.COSObject;
|
||||||
import org.apache.pdfbox.io.IOUtils;
|
import org.apache.pdfbox.io.IOUtils;
|
||||||
|
import org.apache.pdfbox.pdfwriter.compress.CompressParameters;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
|
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocumentInformation;
|
import org.apache.pdfbox.pdmodel.PDDocumentInformation;
|
||||||
@@ -312,7 +313,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
|
|||||||
throw new IOException(
|
throw new IOException(
|
||||||
"File must be attached (usually with setTransaction) before perfoming this operation");
|
"File must be attached (usually with setTransaction) before perfoming this operation");
|
||||||
}
|
}
|
||||||
doc.save(ZUGFeRDfilename);
|
doc.save(ZUGFeRDfilename, CompressParameters.NO_COMPRESSION);
|
||||||
if (!disableAutoClose) {
|
if (!disableAutoClose) {
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
@@ -339,7 +340,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
|
|||||||
throw new IOException(
|
throw new IOException(
|
||||||
"File must be attached (usually with setTransaction) before perfoming this operation");
|
"File must be attached (usually with setTransaction) before perfoming this operation");
|
||||||
}
|
}
|
||||||
doc.save(output);
|
doc.save(output, CompressParameters.NO_COMPRESSION);
|
||||||
if (!disableAutoClose) {
|
if (!disableAutoClose) {
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -9,6 +11,7 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
@Ignore
|
||||||
public class ResourceCase extends TestCase {
|
public class ResourceCase extends TestCase {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(ResourceCase.class.getCanonicalName()); // log output is
|
private static final Logger LOGGER = LoggerFactory.getLogger(ResourceCase.class.getCanonicalName()); // log output is
|
||||||
|
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ public class VisualizationTest extends ResourceCase {
|
|||||||
/* remove file endings so that tests can also pass after checking
|
/* remove file endings so that tests can also pass after checking
|
||||||
out from git with arbitrary options (which may include CSRF changes)
|
out from git with arbitrary options (which may include CSRF changes)
|
||||||
*/
|
*/
|
||||||
result = zvi.visualize(UBLinputFile.getAbsolutePath(),ZUGFeRDVisualizer.Language.EN).replace("\r","").replace("\n","");
|
result = zvi.visualize(UBLinputFile.getAbsolutePath(),ZUGFeRDVisualizer.Language.EN).replace("\r","").replace("\n","").replace(" ","").replace("\t","");
|
||||||
|
|
||||||
File expectedResult=getResourceAsFile("factur-x-vis-ubl-creditnote.en.html");
|
File expectedResult=getResourceAsFile("factur-x-vis-ubl-creditnote.en.html");
|
||||||
expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8).replace("\r","").replace("\n","");
|
expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8).replace("\r","").replace("\n","").replace(" ","").replace("\t","");
|
||||||
// remove linebreaks as well...
|
// remove linebreaks as well...
|
||||||
|
|
||||||
} catch (UnsupportedOperationException e) {
|
} catch (UnsupportedOperationException e) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<html xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xr="urn:ce.eu:en16931:2017:xoev-de:kosit:standard:xrechnung-1" xmlns:xrv="http://www.example.org/XRechnung-Viewer" lang="de">
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns:xr="urn:ce.eu:en16931:2017:xoev-de:kosit:standard:xrechnung-1" xmlns:xrv="http://www.example.org/XRechnung-Viewer" xmlns:xs="http://www.w3.org/2001/XMLSchema" lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>XRechnung</title>
|
<title>XRechnung</title>
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user