diff options
Diffstat (limited to 'test/java/org/apache')
3 files changed, 13 insertions, 17 deletions
diff --git a/test/java/org/apache/fop/URIResolutionTestCase.java b/test/java/org/apache/fop/URIResolutionTestCase.java index 97d1c9c25..490486158 100644 --- a/test/java/org/apache/fop/URIResolutionTestCase.java +++ b/test/java/org/apache/fop/URIResolutionTestCase.java @@ -39,19 +39,21 @@ import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; +import org.junit.BeforeClass; +import org.junit.Test; +import org.w3c.dom.Document; + import org.apache.commons.io.IOUtils; import org.apache.commons.io.output.ByteArrayOutputStream; +import org.apache.xpath.XPathAPI; +import org.apache.xpath.objects.XObject; + import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.Fop; import org.apache.fop.apps.FopFactory; import org.apache.fop.apps.MimeConstants; import org.apache.fop.render.xml.XMLRenderer; -import org.apache.xpath.XPathAPI; -import org.apache.xpath.objects.XObject; -import org.junit.BeforeClass; -import org.junit.Test; -import org.w3c.dom.Document; /** * Tests URI resolution facilities. @@ -160,8 +162,7 @@ public class URIResolutionTestCase extends AbstractFOPTest { TransformerHandler athandler = tfactory.newTransformerHandler(); athandler.setResult(domres); - XMLRenderer atrenderer = new XMLRenderer(); - atrenderer.setUserAgent(ua); + XMLRenderer atrenderer = new XMLRenderer(ua); atrenderer.setContentHandler(athandler); ua.setRendererOverride(atrenderer); diff --git a/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java b/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java index a0de2e8ab..1f8abb9be 100644 --- a/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java +++ b/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java @@ -97,10 +97,9 @@ public class AreaTreeParserTestCase extends AbstractIntermediateTest { Renderer targetRenderer = userAgent.getRendererFactory().createRenderer( userAgent, getTargetMIME()); - XMLRenderer renderer = new XMLRenderer(); + XMLRenderer renderer = new XMLRenderer(userAgent); renderer.mimicRenderer(targetRenderer); renderer.setContentHandler(handler); - renderer.setUserAgent(userAgent); userAgent.setRendererOverride(renderer); @@ -131,12 +130,10 @@ public class AreaTreeParserTestCase extends AbstractIntermediateTest { TransformerHandler handler = testAssistant.getTransformerFactory().newTransformerHandler(); DOMResult domResult = new DOMResult(); handler.setResult(domResult); - XMLRenderer renderer = new XMLRenderer(); - renderer.setContentHandler(handler); - FOUserAgent userAgent = createUserAgent(); + XMLRenderer renderer = new XMLRenderer(userAgent); userAgent.setRendererOverride(renderer); - renderer.setUserAgent(userAgent); + renderer.setContentHandler(handler); FontInfo fontInfo = new FontInfo(); AreaTreeModel treeModel = new RenderPagesModel(userAgent, diff --git a/test/java/org/apache/fop/layoutengine/LayoutEngineTestCase.java b/test/java/org/apache/fop/layoutengine/LayoutEngineTestCase.java index 46908a448..6a0d424e9 100644 --- a/test/java/org/apache/fop/layoutengine/LayoutEngineTestCase.java +++ b/test/java/org/apache/fop/layoutengine/LayoutEngineTestCase.java @@ -150,8 +150,7 @@ public class LayoutEngineTestCase { ua.getEventBroadcaster().addEventListener( new ConsoleEventListenerForTests(testFile.getName(), EventSeverity.WARN)); - XMLRenderer atrenderer = new XMLRenderer(); - atrenderer.setUserAgent(ua); + XMLRenderer atrenderer = new XMLRenderer(ua); atrenderer.setContentHandler(athandler); ua.setRendererOverride(atrenderer); fop = effFactory.newFop(ua); @@ -208,8 +207,7 @@ public class LayoutEngineTestCase { ua.getEventBroadcaster().addEventListener( new ConsoleEventListenerForTests(testFile.getName(), EventSeverity.WARN)); - IFRenderer ifRenderer = new IFRenderer(); - ifRenderer.setUserAgent(ua); + IFRenderer ifRenderer = new IFRenderer(ua); IFSerializer serializer = new IFSerializer(); serializer.setContext(new IFContext(ua)); |