writer test update

This commit is contained in:
jstaerk
2014-07-06 12:53:01 +02:00
parent 016f1f66d3
commit d9e4040cd0
2 changed files with 6 additions and 9 deletions

View File

@@ -44,6 +44,7 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>

View File

@@ -13,13 +13,7 @@ import junit.framework.Test;
import junit.framework.TestCase; import junit.framework.TestCase;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import org.apache.pdfbox.exceptions.COSVisitorException;
import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocument;
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableContact;
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableItem;
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableProduct;
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableTransaction;
import org.mustangproject.ZUGFeRD.ZUGFeRDExporter;
public class MustangWriterTest extends TestCase implements IZUGFeRDExportableTransaction { public class MustangWriterTest extends TestCase implements IZUGFeRDExportableTransaction {
@@ -286,9 +280,7 @@ public class MustangWriterTest extends TestCase implements IZUGFeRDExportableTra
e.printStackTrace(); e.printStackTrace();
} catch (TransformerException e) { } catch (TransformerException e) {
e.printStackTrace(); e.printStackTrace();
} catch (COSVisitorException e) { }
e.printStackTrace();
}
} }
@@ -312,6 +304,10 @@ public class MustangWriterTest extends TestCase implements IZUGFeRDExportableTra
public void testExport() { public void testExport() {
// generate ./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf from ./src/test/MustangGnuaccountingBeispielRE-20140703_502blank.pdf:
// the writing part
apply();
// now check the contents (like MustangReaderTest)
ZUGFeRDImporter zi = new ZUGFeRDImporter(); ZUGFeRDImporter zi = new ZUGFeRDImporter();
zi.extract("./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf"); zi.extract("./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf");
// Reading ZUGFeRD // Reading ZUGFeRD