aboutsummaryrefslogtreecommitdiffstats
path: root/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2010-08-25 15:43:55 +0000
committerVincent Hennebert <vhennebert@apache.org>2010-08-25 15:43:55 +0000
commit26393f0e181ca1c71c83e594fa67cc7c26b49df3 (patch)
tree6cd752956d970f04c9f0ff8892c820014423a1e5 /test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
parentb35843cb0d2d655a20929b96737ee736924afe5e (diff)
downloadxmlgraphics-fop-26393f0e181ca1c71c83e594fa67cc7c26b49df3.tar.gz
xmlgraphics-fop-26393f0e181ca1c71c83e594fa67cc7c26b49df3.zip
Removed old Renderer implementations for AFP, PCL, PDF, PS.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@989178 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java')
-rw-r--r--test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java48
1 files changed, 7 insertions, 41 deletions
diff --git a/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java b/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
index 7f0462a75..72c677a0c 100644
--- a/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
+++ b/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
@@ -43,52 +43,22 @@ import org.apache.fop.render.intermediate.IFContext;
public class ImageHandlingTestCase extends AbstractPostScriptTestCase {
/**
- * Tests JPEG handling with the {@link PSRenderer}.
+ * Tests JPEG handling.
* @throws Exception if an error occurs
*/
- public void testJPEGImageWithRendererLevel3() throws Exception {
- innerTestJPEGImageWithRenderer(3);
+ public void testJPEGImageLevel3() throws Exception {
+ innerTestJPEGImage(3);
}
/**
- * Tests JPEG handling with the {@link PSRenderer}.
+ * Tests JPEG handling.
* @throws Exception if an error occurs
*/
- public void testJPEGImageWithRendererLevel2() throws Exception {
- innerTestJPEGImageWithRenderer(2);
+ public void testJPEGImageLevel2() throws Exception {
+ innerTestJPEGImage(2);
}
- /**
- * Tests JPEG handling with the {@link PSDocumentHandler}.
- * @throws Exception if an error occurs
- */
- public void testJPEGImageWithIFLevel3() throws Exception {
- innerTestJPEGImageWithIF(3);
- }
-
- /**
- * Tests JPEG handling with the {@link PSDocumentHandler}.
- * @throws Exception if an error occurs
- */
- public void testJPEGImageWithIFLevel2() throws Exception {
- innerTestJPEGImageWithIF(2);
- }
-
- private void innerTestJPEGImageWithRenderer(int level) throws Exception {
- FOUserAgent ua = fopFactory.newFOUserAgent();
- PSRenderer renderer = new PSRenderer();
- renderer.setUserAgent(ua);
- PSRenderingUtil psUtil = renderer.getPSUtil();
- psUtil.setLanguageLevel(level);
- psUtil.setOptimizeResources(true);
- ua.setRendererOverride(renderer);
-
- // Prepare output file
- File outputFile = renderFile(ua, "ps-jpeg-image.fo", "-rend-l" + psUtil.getLanguageLevel());
- verifyPostScriptFile(outputFile, psUtil.getLanguageLevel());
- }
-
- private void innerTestJPEGImageWithIF(int level) throws Exception {
+ private void innerTestJPEGImage(int level) throws Exception {
FOUserAgent ua = fopFactory.newFOUserAgent();
PSDocumentHandler handler = new PSDocumentHandler();
handler.setContext(new IFContext(ua));
@@ -159,10 +129,6 @@ public class ImageHandlingTestCase extends AbstractPostScriptTestCase {
}
}
- private void assertMatches(String text, String regex) {
- assertTrue("Text didn't match '" + regex + "'", text.matches(regex));
- }
-
private void assertContains(String text, String searchString) {
assertTrue("Text doesn't contain '" + searchString + "'", text.indexOf(searchString) >= 0);
}