diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/java/org/apache/fop/BasicDriverTestCase.java | 11 | ||||
-rw-r--r-- | test/java/org/apache/fop/GenericFOPTestCase.java | 5 |
2 files changed, 4 insertions, 12 deletions
diff --git a/test/java/org/apache/fop/BasicDriverTestCase.java b/test/java/org/apache/fop/BasicDriverTestCase.java index ab158a396..c512a50ec 100644 --- a/test/java/org/apache/fop/BasicDriverTestCase.java +++ b/test/java/org/apache/fop/BasicDriverTestCase.java @@ -33,7 +33,6 @@ import javax.xml.transform.stream.StreamSource; import org.xml.sax.InputSource; -import org.apache.commons.logging.impl.NoOpLog; import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.fop.apps.Driver; import org.apache.fop.apps.InputHandler; @@ -47,8 +46,6 @@ import org.w3c.dom.Document; */ public class BasicDriverTestCase extends AbstractFOPTestCase { - private NoOpLog logger = new NoOpLog(); - /** * @see junit.framework.TestCase#TestCase(String) */ @@ -67,7 +64,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { new InputSource(foFile.toURL().toExternalForm()), baout); - driver.setLogger(this.logger); driver.setRenderer(Driver.RENDER_PDF); driver.run(); assertTrue("Generated PDF has zero length", baout.size() > 0); @@ -82,7 +78,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); - driver.setLogger(this.logger); driver.setInputSource(new InputSource(foFile.toURL().toExternalForm())); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); @@ -109,7 +104,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); - driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); driver.render(loadDocument(foFile)); @@ -125,7 +119,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); - driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); SAXParserFactory factory = SAXParserFactory.newInstance(); @@ -145,7 +138,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo"); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); - driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); @@ -166,7 +158,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo"); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); - driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PS); @@ -187,7 +178,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo"); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); - driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_RTF); @@ -209,7 +199,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { File xsltFile = new File(getBaseDir(), "test/xsl/doc.xsl"); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(); - driver.setLogger(this.logger); driver.setOutputStream(baout); driver.setRenderer(Driver.RENDER_PDF); diff --git a/test/java/org/apache/fop/GenericFOPTestCase.java b/test/java/org/apache/fop/GenericFOPTestCase.java index 568855849..370b012a9 100644 --- a/test/java/org/apache/fop/GenericFOPTestCase.java +++ b/test/java/org/apache/fop/GenericFOPTestCase.java @@ -31,6 +31,7 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.fop.apps.Driver; +import org.apache.fop.apps.FOUserAgent; import org.apache.fop.render.pdf.PDFRenderer; import org.apache.fop.util.DigestFilter; import org.xml.sax.InputSource; @@ -112,7 +113,9 @@ public final class GenericFOPTestCase extends TestCase { private void renderPDF(String fo, String digestIn, String digestOut) throws Exception { PDFRenderer renderer = new PDFRenderer(); - renderer.setCreationDate(new Date(10000)); + FOUserAgent foUserAgent = new FOUserAgent(); + foUserAgent.setCreationDate(new Date(10000)); + renderer.setUserAgent(foUserAgent); MessageDigest outDigest = MessageDigest.getInstance("MD5"); ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); DigestOutputStream out = |