diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-08-10 15:23:21 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-08-10 15:23:21 +0000 |
commit | c6868b2715731b14eb1dcd375597b5fce9382dd4 (patch) | |
tree | a1829d20b2b8215ebcf394517597b1a8a7603d15 /test/java/org | |
parent | 8f824aa68f5ea3467988e6f658407724a0ae9e1f (diff) | |
download | xmlgraphics-fop-c6868b2715731b14eb1dcd375597b5fce9382dd4.tar.gz xmlgraphics-fop-c6868b2715731b14eb1dcd375597b5fce9382dd4.zip |
Removed DOM-related tests as discussed. We don't want to test the buggy innards of Xalan-J.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@231263 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org')
-rw-r--r-- | test/java/org/apache/fop/BasicDriverTestCase.java | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/test/java/org/apache/fop/BasicDriverTestCase.java b/test/java/org/apache/fop/BasicDriverTestCase.java index e6dc07d27..655d8f10e 100644 --- a/test/java/org/apache/fop/BasicDriverTestCase.java +++ b/test/java/org/apache/fop/BasicDriverTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,6 @@ package org.apache.fop; import java.io.File; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; @@ -32,8 +30,6 @@ import javax.xml.transform.dom.DOMResult; import javax.xml.transform.sax.SAXResult; import javax.xml.transform.stream.StreamSource; -import org.xml.sax.InputSource; - import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.fop.apps.Fop; import org.apache.fop.apps.InputHandler; @@ -42,7 +38,6 @@ import org.w3c.dom.Document; /** * Basic runtime test for the old Fop class. It is used to verify that * nothing obvious is broken after compiling. - * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a> */ public class BasicDriverTestCase extends AbstractFOPTestCase { @@ -53,35 +48,6 @@ public class BasicDriverTestCase extends AbstractFOPTestCase { super(name); } - private Document loadDocument(File foFile) - throws TransformerException { - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer transformer = factory.newTransformer(); - Source src = new StreamSource(foFile); - DOMResult res = new DOMResult(); - transformer.transform(src, res); - return (Document)res.getNode(); - } - - /** - * Tests DOM with JAXP and OutputStream generating PostScript. - * @throws Exception if anything fails - */ - public void testFO2PDFWithDOM() throws Exception { - File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo"); - ByteArrayOutputStream baout = new ByteArrayOutputStream(); - Fop fop = new Fop(Fop.RENDER_PDF); - fop.setOutputStream(baout); - - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer transformer = factory.newTransformer(); //Identity transf. - Source src = new DOMSource(loadDocument(foFile)); - Result res = new SAXResult(fop.getDefaultHandler()); - transformer.transform(src, res); - - assertTrue("Generated PostScript has zero length", baout.size() > 0); - } - /** * Tests Fop with JAXP and OutputStream generating PDF. * @throws Exception if anything fails |