From c6868b2715731b14eb1dcd375597b5fce9382dd4 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 10 Aug 2005 15:23:21 +0000 Subject: 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 --- test/java/org/apache/fop/BasicDriverTestCase.java | 36 +---------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'test/java/org') 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 Jeremias Maerki */ 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 -- cgit v1.2.3