From b07707d8cd6e692d2cf43324756fc33fa18554bc Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Thu, 31 Mar 2016 10:34:24 +0000 Subject: [PATCH] Correct PDFVT Test git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1737214 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/fop/pdf/PDFVTTestCase.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fop-core/src/test/java/org/apache/fop/pdf/PDFVTTestCase.java b/fop-core/src/test/java/org/apache/fop/pdf/PDFVTTestCase.java index fc03110dc..63deaffba 100644 --- a/fop-core/src/test/java/org/apache/fop/pdf/PDFVTTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFVTTestCase.java @@ -22,7 +22,6 @@ import java.awt.geom.Rectangle2D; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Collection; @@ -137,17 +136,14 @@ public class PDFVTTestCase { Fop fop = fopFactory.newFop(mimeFopIf, userAgent, out); Transformer transformer = TransformerFactory.newInstance().newTransformer(); - // [TBD] FIXME - use getResource() to access FO file [GA] - Source src = new StreamSource( - new FileInputStream("../fop-core/src/test/resources/org/apache/fop/pdf/PDFVT.fo")); + Source src = new StreamSource(PDFVTTestCase.class.getResource("PDFVT.fo").openStream()); Result res = new SAXResult(fop.getDefaultHandler()); transformer.transform(src, res); } private FopFactory getFopFactory() throws IOException, SAXException { - // [TBD] FIXME - use getResource() to access conf file [GA] return FopFactory.newInstance(new File(".").toURI(), - new FileInputStream("../fop-core/src/test/resources/org/apache/fop/pdf/PDFVT.xconf")); + PDFVTTestCase.class.getResource("PDFVT.xconf").openStream()); } private void iFToPDF(InputStream is) throws IOException, SAXException, TransformerException, IFException { -- 2.39.5