]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Correct PDFVT Test
authorSimon Steiner <ssteiner@apache.org>
Thu, 31 Mar 2016 10:34:24 +0000 (10:34 +0000)
committerSimon Steiner <ssteiner@apache.org>
Thu, 31 Mar 2016 10:34:24 +0000 (10:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1737214 13f79535-47bb-0310-9956-ffa450edef68

fop-core/src/test/java/org/apache/fop/pdf/PDFVTTestCase.java

index fc03110dcdbedfe31ca2fd21c9a4789da8a2bd94..63deaffba76ae41cf41371d7df1da719a3aed8c9 100644 (file)
@@ -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 {