diff options
Diffstat (limited to 'test/java/org/apache/fop/render')
13 files changed, 34 insertions, 26 deletions
diff --git a/test/java/org/apache/fop/render/AbstractRenderingTestCase.java b/test/java/org/apache/fop/render/AbstractRenderingTest.java index 9eecfb106..1f91f5b06 100644 --- a/test/java/org/apache/fop/render/AbstractRenderingTestCase.java +++ b/test/java/org/apache/fop/render/AbstractRenderingTest.java @@ -41,7 +41,7 @@ import org.apache.fop.apps.MimeConstants; /** * Abstract base class for rendering (output) verification tests. */ -public abstract class AbstractRenderingTestCase { +public abstract class AbstractRenderingTest { private static final Map<String, String> MIME_MAP = new java.util.HashMap<String, String>(); diff --git a/test/java/org/apache/fop/render/RendererFactoryTest.java b/test/java/org/apache/fop/render/RendererFactoryTestCase.java index 4f1c50986..9ca4c2545 100644 --- a/test/java/org/apache/fop/render/RendererFactoryTest.java +++ b/test/java/org/apache/fop/render/RendererFactoryTestCase.java @@ -22,7 +22,10 @@ package org.apache.fop.render; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import org.junit.Test; + import org.apache.commons.io.output.NullOutputStream; + import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.FopFactory; @@ -34,12 +37,11 @@ import org.apache.fop.render.intermediate.IFDocumentHandler; import org.apache.fop.render.intermediate.IFRenderer; import org.apache.fop.render.pdf.PDFDocumentHandler; import org.apache.fop.render.rtf.RTFHandler; -import org.junit.Test; /** * Tests for {@link RendererFactory}. */ -public class RendererFactoryTest { +public class RendererFactoryTestCase { @Test public void testDocumentHandlerLevel() throws Exception { @@ -51,7 +53,6 @@ public class RendererFactoryTest { ua = fopFactory.newFOUserAgent(); handler = factory.createDocumentHandler(ua, MimeConstants.MIME_PDF); - assertTrue(handler instanceof PDFDocumentHandler); ua = fopFactory.newFOUserAgent(); overrideHandler = new PDFDocumentHandler(); diff --git a/test/java/org/apache/fop/render/afp/AbstractAFPTestCase.java b/test/java/org/apache/fop/render/afp/AbstractAFPTest.java index 7f081a4d0..916c68395 100644 --- a/test/java/org/apache/fop/render/afp/AbstractAFPTestCase.java +++ b/test/java/org/apache/fop/render/afp/AbstractAFPTest.java @@ -23,12 +23,12 @@ import java.io.File; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.MimeConstants; -import org.apache.fop.render.AbstractRenderingTestCase; +import org.apache.fop.render.AbstractRenderingTest; /** * Abstract base class for AFP verification tests. */ -abstract class AbstractAFPTestCase extends AbstractRenderingTestCase { +abstract class AbstractAFPTest extends AbstractRenderingTest { /** * Renders a test file. diff --git a/test/java/org/apache/fop/render/afp/NoOperationTestCase.java b/test/java/org/apache/fop/render/afp/NoOperationTestCase.java index eadc14f48..78578a2b6 100644 --- a/test/java/org/apache/fop/render/afp/NoOperationTestCase.java +++ b/test/java/org/apache/fop/render/afp/NoOperationTestCase.java @@ -37,7 +37,7 @@ import org.junit.Test; /** * Tests generation of afp:no-operation (NOPs). */ -public class NoOperationTestCase extends AbstractAFPTestCase { +public class NoOperationTestCase extends AbstractAFPTest { /** * Tests afp:no-operation. diff --git a/test/java/org/apache/fop/render/extensions/prepress/PageBoundariesTest.java b/test/java/org/apache/fop/render/extensions/prepress/PageBoundariesTestCase.java index 7ec515ece..6e48845c1 100644 --- a/test/java/org/apache/fop/render/extensions/prepress/PageBoundariesTest.java +++ b/test/java/org/apache/fop/render/extensions/prepress/PageBoundariesTestCase.java @@ -31,7 +31,7 @@ import org.junit.Test; /** * Tests for the fox:bleed, fox:crop-offset, fox:crop-box extension properties. */ -public class PageBoundariesTest { +public class PageBoundariesTestCase { private static final Dimension TEST_AREA_SIZE = new Dimension(20000, 15000); diff --git a/test/java/org/apache/fop/render/extensions/prepress/PageScaleTest.java b/test/java/org/apache/fop/render/extensions/prepress/PageScaleTestCase.java index 0908e869e..ff07e63ce 100644 --- a/test/java/org/apache/fop/render/extensions/prepress/PageScaleTest.java +++ b/test/java/org/apache/fop/render/extensions/prepress/PageScaleTestCase.java @@ -30,7 +30,7 @@ import org.junit.Test; /** * Tests for the fox:scale extension property. */ -public class PageScaleTest { +public class PageScaleTestCase { /** 1 value is used for both x and y. */ @Test diff --git a/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java b/test/java/org/apache/fop/render/pdf/BasePDFTest.java index 256f78839..09db7538d 100644 --- a/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java +++ b/test/java/org/apache/fop/render/pdf/BasePDFTest.java @@ -30,7 +30,7 @@ import javax.xml.transform.stream.StreamSource; import org.apache.commons.io.FileUtils; import org.apache.commons.io.output.ByteArrayOutputStream; -import org.apache.fop.AbstractFOPTestCase; +import org.apache.fop.AbstractFOPTest; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.Fop; import org.apache.fop.apps.FopFactory; @@ -40,7 +40,7 @@ import org.xml.sax.SAXException; /** * Base class for automated tests that create PDF files */ -public class BasePDFTestCase extends AbstractFOPTestCase { +public class BasePDFTest extends AbstractFOPTest { /** the FopFactory */ protected final FopFactory fopFactory = FopFactory.newInstance(); @@ -51,7 +51,7 @@ public class BasePDFTestCase extends AbstractFOPTestCase { /** * Main constructor */ - protected BasePDFTestCase() { + protected BasePDFTest() { init(); } diff --git a/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java b/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java index 67c4df280..fa6d9d89e 100644 --- a/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java +++ b/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java @@ -30,7 +30,7 @@ import org.junit.Test; /** * Tests PDF/A-1 functionality. */ -public class PDFAConformanceTestCase extends BasePDFTestCase { +public class PDFAConformanceTestCase extends BasePDFTest { private File foBaseDir = new File("test/xml/pdf-a"); private boolean dumpPDF = Boolean.getBoolean("PDFAConformanceTestCase.dumpPDF"); diff --git a/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java b/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java index b385e5598..122c23967 100644 --- a/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java +++ b/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java @@ -31,7 +31,7 @@ import org.junit.Ignore; import org.junit.Test; /** Test that characters are correctly encoded in a generated PDF file */ -public class PDFEncodingTestCase extends BasePDFTestCase { +public class PDFEncodingTestCase extends BasePDFTest { private File foBaseDir = new File("test/xml/pdf-encoding"); private final boolean dumpPDF = Boolean.getBoolean("PDFEncodingTestCase.dumpPDF"); static final String INPUT_FILE = "test/xml/pdf-encoding/pdf-encoding-test.xconf"; diff --git a/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java b/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java index 6818537a8..dd67e97fa 100644 --- a/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java +++ b/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java @@ -29,7 +29,7 @@ import org.junit.Test; /** * Tests the disables-srgb-colorspace setting. */ -public class PDFsRGBSettingsTestCase extends BasePDFTestCase { +public class PDFsRGBSettingsTestCase extends BasePDFTest { private File foBaseDir = new File("test/xml/pdf-a"); diff --git a/test/java/org/apache/fop/render/ps/AbstractPostScriptTestCase.java b/test/java/org/apache/fop/render/ps/AbstractPostScriptTest.java index cdd1ee567..dcbc2d757 100644 --- a/test/java/org/apache/fop/render/ps/AbstractPostScriptTestCase.java +++ b/test/java/org/apache/fop/render/ps/AbstractPostScriptTest.java @@ -33,12 +33,12 @@ import org.apache.xmlgraphics.ps.dsc.events.DSCEvent; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.MimeConstants; -import org.apache.fop.render.AbstractRenderingTestCase; +import org.apache.fop.render.AbstractRenderingTest; /** * Abstract base class for PostScript verification tests. */ -public abstract class AbstractPostScriptTestCase extends AbstractRenderingTestCase { +public abstract class AbstractPostScriptTest extends AbstractRenderingTest { /** * Renders a test file. diff --git a/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java b/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java index f4c3617e3..416372187 100644 --- a/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java +++ b/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java @@ -25,9 +25,10 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; +import org.junit.Test; + import org.apache.commons.io.IOUtils; -import org.apache.fop.apps.FOUserAgent; -import org.apache.fop.render.intermediate.IFContext; + import org.apache.xmlgraphics.ps.DSCConstants; import org.apache.xmlgraphics.ps.PSResource; import org.apache.xmlgraphics.ps.dsc.DSCException; @@ -36,12 +37,14 @@ import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPage; import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPages; import org.apache.xmlgraphics.ps.dsc.events.DSCCommentTitle; import org.apache.xmlgraphics.ps.dsc.events.DSCEvent; -import org.junit.Test; + +import org.apache.fop.apps.FOUserAgent; +import org.apache.fop.render.intermediate.IFContext; /** * Tests the image handling in PostScript output. */ -public class ImageHandlingTestCase extends AbstractPostScriptTestCase { +public class ImageHandlingTestCase extends AbstractPostScriptTest { /** * Tests JPEG handling. @@ -71,7 +74,8 @@ public class ImageHandlingTestCase extends AbstractPostScriptTestCase { ua.setDocumentHandlerOverride(handler); // Prepare output file - File outputFile = renderFile(ua, "ps-jpeg-image.fo", "-if-l" + psUtil.getLanguageLevel()); + File outputFile = renderFile(ua, "ps-jpeg-image.fo", + "-if-l" + psUtil.getLanguageLevel()); verifyPostScriptFile(outputFile, psUtil.getLanguageLevel()); } diff --git a/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java b/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java index 91787aca1..e4cb743b4 100644 --- a/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java +++ b/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java @@ -31,9 +31,10 @@ import java.util.Arrays; import java.util.Collection; import java.util.Set; +import org.junit.Test; + import org.apache.commons.io.IOUtils; -import org.apache.fop.apps.FOUserAgent; -import org.apache.fop.render.intermediate.IFContext; + import org.apache.xmlgraphics.ps.DSCConstants; import org.apache.xmlgraphics.ps.PSResource; import org.apache.xmlgraphics.ps.dsc.DSCException; @@ -49,13 +50,15 @@ import org.apache.xmlgraphics.ps.dsc.events.DSCCommentEndOfFile; import org.apache.xmlgraphics.ps.dsc.events.DSCCommentIncludeResource; import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPage; import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPages; -import org.junit.Test; + +import org.apache.fop.apps.FOUserAgent; +import org.apache.fop.render.intermediate.IFContext; /** * Tests the PostScript resource optimization (selective de-duplication of * images that are used multiple times). */ -public class ResourceOptimizationTestCase extends AbstractPostScriptTestCase { +public class ResourceOptimizationTestCase extends AbstractPostScriptTest { /** * Tests resource optimization. |