Do not create test output in source directories to keep git clean.

This commit is contained in:
Bernd Eckenfels
2014-09-17 21:50:48 +02:00
parent 5e04bd2342
commit a6dae7dc00
2 changed files with 17 additions and 17 deletions

View File

@@ -322,26 +322,26 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
/** /**
* The exporter test bases on ./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf, adds metadata, writes * The exporter test bases on @{code ./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf}, adds metadata, writes
* (to ./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf) and then imports to check the values. * to @{code ./target/testout-*} and then imports to check the values.
* *
* It would not make sense to have it run before the less complex importer test (which is probably redundant) * It would not make sense to have it run before the less complex importer test (which is probably redundant)
* --> as only Name Ascending is supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export * --> as only Name Ascending is supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
*/ */
public void testZExport() { public void testZExport() {
// generate ./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf from ./src/test/MustangGnuaccountingBeispielRE-20140703_502blank.pdf: final String SOURCE_PDF = "./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf";
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20140703_502newEdge.pdf";
// the writing part // the writing part
PDDocument doc; PDDocument doc;
try { try {
doc = PDDocument doc = PDDocument.load(SOURCE_PDF);
.load("./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf");
// automatically add Zugferd to all outgoing invoices // automatically add Zugferd to all outgoing invoices
ZUGFeRDExporter ze = new ZUGFeRDExporter(); ZUGFeRDExporter ze = new ZUGFeRDExporter();
ze.PDFmakeA3compliant(doc, "My Application", ze.PDFmakeA3compliant(doc, "My Application",
System.getProperty("user.name"), true); System.getProperty("user.name"), true);
ze.PDFattachZugferdFile(doc, this); ze.PDFattachZugferdFile(doc, this);
doc.save("./src/test/MustangGnuaccountingBeispielRE-20140703_502newEdge.pdf"); doc.save(TARGET_PDF);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} catch (TransformerException e) { } catch (TransformerException e) {
@@ -353,7 +353,7 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
// now check the contents (like MustangReaderTest) // now check the contents (like MustangReaderTest)
ZUGFeRDImporter zi = new ZUGFeRDImporter(); ZUGFeRDImporter zi = new ZUGFeRDImporter();
zi.extract("./src/test/MustangGnuaccountingBeispielRE-20140703_502newEdge.pdf"); zi.extract(TARGET_PDF);
// Reading ZUGFeRD // Reading ZUGFeRD
String amount=null; String amount=null;

View File

@@ -322,26 +322,26 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
/** /**
* The exporter test bases on ./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf, adds metadata, writes * The exporter test bases on @{code ./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf}, adds metadata, writes
* (to ./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf) and then imports to check the values. * to @{code ./target/testout-*} and then imports to check the values.
* *
* It would not make sense to have it run before the less complex importer test (which is probably redundant) * It would not make sense to have it run before the less complex importer test (which is probably redundant)
* --> as only Name Ascending is supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export * --> as only Name Ascending is supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
*/ */
public void testZExport() { public void testZExport() {
// generate ./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf from ./src/test/MustangGnuaccountingBeispielRE-20140703_502blank.pdf: final String SOURCE_PDF = "./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf";
// the writing part final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20140703_502new.pdf";
// the writing part
PDDocument doc; PDDocument doc;
try { try {
doc = PDDocument doc = PDDocument.load(SOURCE_PDF);
.load("./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf");
// automatically add Zugferd to all outgoing invoices // automatically add Zugferd to all outgoing invoices
ZUGFeRDExporter ze = new ZUGFeRDExporter(); ZUGFeRDExporter ze = new ZUGFeRDExporter();
ze.PDFmakeA3compliant(doc, "My Application", ze.PDFmakeA3compliant(doc, "My Application",
System.getProperty("user.name"), true); System.getProperty("user.name"), true);
ze.PDFattachZugferdFile(doc, this); ze.PDFattachZugferdFile(doc, this);
doc.save("./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf"); doc.save(TARGET_PDF);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} catch (TransformerException e) { } catch (TransformerException e) {
@@ -353,7 +353,7 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
// now check the contents (like MustangReaderTest) // now check the contents (like MustangReaderTest)
ZUGFeRDImporter zi = new ZUGFeRDImporter(); ZUGFeRDImporter zi = new ZUGFeRDImporter();
zi.extract("./src/test/MustangGnuaccountingBeispielRE-20140703_502new.pdf"); zi.extract(TARGET_PDF);
// Reading ZUGFeRD // Reading ZUGFeRD
String amount=null; String amount=null;