aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMehdi Houshmand <mehdi@apache.org>2012-06-20 13:51:14 +0000
committerMehdi Houshmand <mehdi@apache.org>2012-06-20 13:51:14 +0000
commitc36ffee9dfbf111899bbca5f994e334ca6b95011 (patch)
tree70107daa49cea97a4456a32087d0703baf84eed8 /test
parentd32664f71c991d0d9fd4445d3fc1b5e83bb0a963 (diff)
downloadxmlgraphics-fop-c36ffee9dfbf111899bbca5f994e334ca6b95011.tar.gz
xmlgraphics-fop-c36ffee9dfbf111899bbca5f994e334ca6b95011.zip
Added tests and cleaning up of code
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_URI_Unification@1352101 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/java/org/apache/fop/apps/AFPRendererConfBuilder.java38
-rw-r--r--test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java10
-rw-r--r--test/java/org/apache/fop/apps/EnvironmentalProfileFactoryTestCase.java39
-rw-r--r--test/java/org/apache/fop/apps/FopConfBuilder.java4
-rw-r--r--test/java/org/apache/fop/apps/Java2DRendererConfBuilder.java2
-rw-r--r--test/java/org/apache/fop/apps/PDFRendererConfBuilder.java30
-rw-r--r--test/java/org/apache/fop/apps/PSRendererConfBuilder.java10
-rw-r--r--test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java2
-rw-r--r--test/java/org/apache/fop/apps/TxtRendererConfBuilder.java2
-rw-r--r--test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfigParserTester.java16
-rw-r--r--test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfiguratorTest.java14
-rw-r--r--test/java/org/apache/fop/render/bitmap/BitmapRendererConfigParserTestCase.java3
-rw-r--r--test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java9
-rw-r--r--test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java20
-rw-r--r--test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java4
15 files changed, 120 insertions, 83 deletions
diff --git a/test/java/org/apache/fop/apps/AFPRendererConfBuilder.java b/test/java/org/apache/fop/apps/AFPRendererConfBuilder.java
index 4ce9cb2a0..5e7204f9e 100644
--- a/test/java/org/apache/fop/apps/AFPRendererConfBuilder.java
+++ b/test/java/org/apache/fop/apps/AFPRendererConfBuilder.java
@@ -19,33 +19,31 @@
package org.apache.fop.apps;
-
-import java.net.URI;
import java.util.Map;
import org.w3c.dom.Element;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
import org.apache.fop.render.afp.AFPRendererConfig;
-import org.apache.fop.render.afp.AFPRendererConfig.Options;
+import org.apache.fop.render.afp.AFPRendererConfigOption;
import org.apache.fop.render.afp.AFPShadingMode;
import static org.apache.fop.render.afp.AFPRendererConfig.ImagesModeOptions.MODE_GRAYSCALE;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.DEFAULT_RESOURCE_LEVELS;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.IMAGES;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.IMAGES_DITHERING_QUALITY;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.IMAGES_FS45;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.IMAGES_JPEG;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.IMAGES_MAPPING_OPTION;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.IMAGES_MODE;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.IMAGES_NATIVE;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.IMAGES_WRAP_PSEG;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.JPEG_ALLOW_JPEG_EMBEDDING;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.JPEG_BITMAP_ENCODING_QUALITY;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.RENDERER_RESOLUTION;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.LINE_WIDTH_CORRECTION;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.RESOURCE_GROUP_URI;
-import static org.apache.fop.render.afp.AFPRendererConfig.Options.SHADING;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.DEFAULT_RESOURCE_LEVELS;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_DITHERING_QUALITY;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_FS45;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_JPEG;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_MAPPING_OPTION;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_MODE;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_NATIVE;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_WRAP_PSEG;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.JPEG_ALLOW_JPEG_EMBEDDING;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.JPEG_BITMAP_ENCODING_QUALITY;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.LINE_WIDTH_CORRECTION;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.RENDERER_RESOLUTION;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.RESOURCE_GROUP_URI;
+import static org.apache.fop.render.afp.AFPRendererConfigOption.SHADING;
/**
* A config builder specific to a particular renderer for specific MIME type.
@@ -58,7 +56,7 @@ public final class AFPRendererConfBuilder extends RendererConfBuilder {
super(MimeConstants.MIME_AFP);
}
- private AFPRendererConfBuilder createTextElement(Options option, String value) {
+ private AFPRendererConfBuilder createTextElement(AFPRendererConfigOption option, String value) {
createTextElement(option.getName(), value);
return this;
}
@@ -155,7 +153,7 @@ public final class AFPRendererConfBuilder extends RendererConfBuilder {
return AFPRendererConfBuilder.this.endImages();
}
- private ImagesBuilder setAttribute(Options options, Object value) {
+ private ImagesBuilder setAttribute(AFPRendererConfigOption options, Object value) {
return setAttribute(options.getName(), value);
}
diff --git a/test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java b/test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java
index 2a75aad6c..b0e468be0 100644
--- a/test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java
+++ b/test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java
@@ -21,11 +21,11 @@ package org.apache.fop.apps;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.ANTI_ALIASING;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.BACKGROUND_COLOR;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.JAVA2D_TRANSPARENT_PAGE_BACKGROUND;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.RENDERING_QUALITY_ELEMENT;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.ANTI_ALIASING;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.BACKGROUND_COLOR;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.JAVA2D_TRANSPARENT_PAGE_BACKGROUND;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.RENDERING_QUALITY_ELEMENT;
public class BitmapRendererConfBuilder extends RendererConfBuilder {
diff --git a/test/java/org/apache/fop/apps/EnvironmentalProfileFactoryTestCase.java b/test/java/org/apache/fop/apps/EnvironmentalProfileFactoryTestCase.java
new file mode 100644
index 000000000..7b033969b
--- /dev/null
+++ b/test/java/org/apache/fop/apps/EnvironmentalProfileFactoryTestCase.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.fop.apps;
+
+import java.net.URI;
+
+import org.junit.Test;
+
+import org.apache.fop.apps.io.ResourceResolver;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
+public class EnvironmentalProfileFactoryTestCase {
+
+ private final URI testURI = URI.create("this.is.purely.for.test.purposes");
+
+ @Test
+ public void testCreateDefault() {
+ ResourceResolver mockedResolver = mock(ResourceResolver.class);
+ EnvironmentProfile sut = EnvironmentalProfileFactory.createDefault(testURI, mockedResolver);
+ assertEquals(mockedResolver, sut.getResourceResolver());
+ }
+}
diff --git a/test/java/org/apache/fop/apps/FopConfBuilder.java b/test/java/org/apache/fop/apps/FopConfBuilder.java
index 9c2c32a2f..1efb2d698 100644
--- a/test/java/org/apache/fop/apps/FopConfBuilder.java
+++ b/test/java/org/apache/fop/apps/FopConfBuilder.java
@@ -42,7 +42,7 @@ import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.apache.fop.render.RendererConfigOptions;
+import org.apache.fop.render.RendererConfigOption;
/**
* A builder class for creating fop.xconf XML DOMs for test purposes. You can set all the necessary
@@ -336,7 +336,7 @@ public class FopConfBuilder implements FontConfigurator<FopConfBuilder> {
return createTextElement(name, value, rendererEl);
}
- protected final Element createTextElement(RendererConfigOptions option, String value) {
+ protected final Element createTextElement(RendererConfigOption option, String value) {
return createTextElement(option.getName(), value, rendererEl);
}
diff --git a/test/java/org/apache/fop/apps/Java2DRendererConfBuilder.java b/test/java/org/apache/fop/apps/Java2DRendererConfBuilder.java
index 59a6fae21..00568cfc5 100644
--- a/test/java/org/apache/fop/apps/Java2DRendererConfBuilder.java
+++ b/test/java/org/apache/fop/apps/Java2DRendererConfBuilder.java
@@ -21,7 +21,7 @@ package org.apache.fop.apps;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
-import static org.apache.fop.render.java2d.Java2DRendererOptions.JAVA2D_TRANSPARENT_PAGE_BACKGROUND;
+import static org.apache.fop.render.java2d.Java2DRendererOption.JAVA2D_TRANSPARENT_PAGE_BACKGROUND;
public class Java2DRendererConfBuilder extends RendererConfBuilder {
diff --git a/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java b/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java
index ca57cbfc7..bf16c59ca 100644
--- a/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java
+++ b/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java
@@ -22,19 +22,19 @@ package org.apache.fop.apps;
import org.w3c.dom.Element;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
-import org.apache.fop.render.RendererConfigOptions;
-import org.apache.fop.render.pdf.PDFRendererConfigOptions;
-
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.DISABLE_SRGB_COLORSPACE;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.ENCRYPTION_LENGTH;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.ENCRYPTION_PARAMS;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.FILTER_LIST;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.OUTPUT_PROFILE;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.OWNER_PASSWORD;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.PDF_A_MODE;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.PDF_X_MODE;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.USER_PASSWORD;
-import static org.apache.fop.render.pdf.PDFRendererConfigOptions.VERSION;
+import org.apache.fop.render.RendererConfigOption;
+import org.apache.fop.render.pdf.PDFRendererConfigOption;
+
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.DISABLE_SRGB_COLORSPACE;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.ENCRYPTION_LENGTH;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.ENCRYPTION_PARAMS;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.FILTER_LIST;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.OUTPUT_PROFILE;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.OWNER_PASSWORD;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.PDF_A_MODE;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.PDF_X_MODE;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.USER_PASSWORD;
+import static org.apache.fop.render.pdf.PDFRendererConfigOption.VERSION;
/**
* A config builder specific to a particular renderer for specific MIME type.
@@ -115,7 +115,7 @@ public final class PDFRendererConfBuilder extends RendererConfBuilder {
return this;
}
- public EncryptionParamsBuilder setAllowParam(PDFRendererConfigOptions option) {
+ public EncryptionParamsBuilder setAllowParam(PDFRendererConfigOption option) {
el.appendChild(createElement(option.getName()));
return this;
}
@@ -124,7 +124,7 @@ public final class PDFRendererConfBuilder extends RendererConfBuilder {
return PDFRendererConfBuilder.this.endEncryptionParams();
}
- private void createTextElement(RendererConfigOptions name, String value) {
+ private void createTextElement(RendererConfigOption name, String value) {
PDFRendererConfBuilder.this.createTextElement(name.getName(), value, el);
}
diff --git a/test/java/org/apache/fop/apps/PSRendererConfBuilder.java b/test/java/org/apache/fop/apps/PSRendererConfBuilder.java
index 6b708efc0..2fec155ff 100644
--- a/test/java/org/apache/fop/apps/PSRendererConfBuilder.java
+++ b/test/java/org/apache/fop/apps/PSRendererConfBuilder.java
@@ -21,11 +21,11 @@ package org.apache.fop.apps;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
-import static org.apache.fop.render.ps.PSRendererConfigurationOptions.AUTO_ROTATE_LANDSCAPE;
-import static org.apache.fop.render.ps.PSRendererConfigurationOptions.DSC_COMPLIANT;
-import static org.apache.fop.render.ps.PSRendererConfigurationOptions.LANGUAGE_LEVEL;
-import static org.apache.fop.render.ps.PSRendererConfigurationOptions.OPTIMIZE_RESOURCES;
-import static org.apache.fop.render.ps.PSRendererConfigurationOptions.SAFE_SET_PAGE_DEVICE;
+import static org.apache.fop.render.ps.PSRendererConfigurationOption.AUTO_ROTATE_LANDSCAPE;
+import static org.apache.fop.render.ps.PSRendererConfigurationOption.DSC_COMPLIANT;
+import static org.apache.fop.render.ps.PSRendererConfigurationOption.LANGUAGE_LEVEL;
+import static org.apache.fop.render.ps.PSRendererConfigurationOption.OPTIMIZE_RESOURCES;
+import static org.apache.fop.render.ps.PSRendererConfigurationOption.SAFE_SET_PAGE_DEVICE;
/**
* A fop conf builder specific to a particular renderer for Postscript.
diff --git a/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java b/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java
index a7a1a7690..0ae06e62f 100644
--- a/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java
+++ b/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java
@@ -19,7 +19,7 @@
package org.apache.fop.apps;
-import static org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererConfigOptions.COMPRESSION;
+import static org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererConfigOption.COMPRESSION;
public class TIFFRendererConfBuilder extends BitmapRendererConfBuilder {
diff --git a/test/java/org/apache/fop/apps/TxtRendererConfBuilder.java b/test/java/org/apache/fop/apps/TxtRendererConfBuilder.java
index 5e9f6af42..3e022762a 100644
--- a/test/java/org/apache/fop/apps/TxtRendererConfBuilder.java
+++ b/test/java/org/apache/fop/apps/TxtRendererConfBuilder.java
@@ -21,7 +21,7 @@ package org.apache.fop.apps;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
-import static org.apache.fop.render.txt.TxtRendererConfig.TxtRendererConfigOptions.ENCODING;
+import static org.apache.fop.render.txt.TxtRendererConfig.TxtRendererConfigOption.ENCODING;
public class TxtRendererConfBuilder extends RendererConfBuilder {
diff --git a/test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfigParserTester.java b/test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfigParserTester.java
index 5a885a143..312ee43c5 100644
--- a/test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfigParserTester.java
+++ b/test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfigParserTester.java
@@ -28,14 +28,14 @@ import org.apache.fop.apps.AbstractRendererConfigParserTester;
import org.apache.fop.apps.BitmapRendererConfBuilder;
import org.apache.fop.render.bitmap.BitmapRendererConfig.BitmapRendererConfigParser;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_BILEVEL;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_BINARY;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_GRAY;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_RGB;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_RGBA;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.JAVA2D_TRANSPARENT_PAGE_BACKGROUND;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.RENDERING_QUALITY;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.RENDERING_SPEED;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_BILEVEL;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_BINARY;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_GRAY;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_RGB;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_RGBA;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.JAVA2D_TRANSPARENT_PAGE_BACKGROUND;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.RENDERING_QUALITY;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.RENDERING_SPEED;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
diff --git a/test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfiguratorTest.java b/test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfiguratorTest.java
index 77e8f1247..2e2bccc36 100644
--- a/test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfiguratorTest.java
+++ b/test/java/org/apache/fop/render/bitmap/AbstractBitmapRendererConfiguratorTest.java
@@ -28,13 +28,13 @@ import org.apache.fop.apps.BitmapRendererConfBuilder;
import org.apache.fop.render.intermediate.IFDocumentHandler;
import org.apache.fop.util.ColorUtil;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_BILEVEL;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_BINARY;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_GRAY;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_RGB;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.COLOR_MODE_RGBA;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.RENDERING_QUALITY;
-import static org.apache.fop.render.bitmap.BitmapRendererConfigOptions.RENDERING_SPEED;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_BILEVEL;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_BINARY;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_GRAY;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_RGB;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE_RGBA;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.RENDERING_QUALITY;
+import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.RENDERING_SPEED;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
diff --git a/test/java/org/apache/fop/render/bitmap/BitmapRendererConfigParserTestCase.java b/test/java/org/apache/fop/render/bitmap/BitmapRendererConfigParserTestCase.java
index 82dbfa590..3c44bfdf7 100644
--- a/test/java/org/apache/fop/render/bitmap/BitmapRendererConfigParserTestCase.java
+++ b/test/java/org/apache/fop/render/bitmap/BitmapRendererConfigParserTestCase.java
@@ -19,11 +19,12 @@
package org.apache.fop.render.bitmap;
+import org.apache.fop.apps.MimeConstants;
import org.apache.fop.render.bitmap.BitmapRendererConfig.BitmapRendererConfigParser;
public class BitmapRendererConfigParserTestCase extends AbstractBitmapRendererConfigParserTester {
public BitmapRendererConfigParserTestCase() {
- super(new BitmapRendererConfigParser("bitmap"));
+ super(new BitmapRendererConfigParser(MimeConstants.MIME_BITMAP));
}
}
diff --git a/test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java b/test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java
index bba656e78..b0f1f46b7 100644
--- a/test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java
+++ b/test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java
@@ -22,11 +22,10 @@ package org.apache.fop.render.pcl;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.render.pcl.PCLRendererConfig.Options;
-import static org.apache.fop.render.pcl.PCLRendererConfig.Options.DISABLE_PJL;
-import static org.apache.fop.render.pcl.PCLRendererConfig.Options.RENDERING_MODE;
-import static org.apache.fop.render.pcl.PCLRendererConfig.Options.TEXT_RENDERING;
+import static org.apache.fop.render.pcl.Java2DRendererConfigOption.DISABLE_PJL;
+import static org.apache.fop.render.pcl.Java2DRendererConfigOption.RENDERING_MODE;
+import static org.apache.fop.render.pcl.Java2DRendererConfigOption.TEXT_RENDERING;
/**
* A config builder specific to a particular renderer for specific MIME type.
*/
@@ -52,7 +51,7 @@ public final class PCLRendererConfBuilder extends RendererConfBuilder {
return createTextElement(DISABLE_PJL, String.valueOf(value));
}
- private PCLRendererConfBuilder createTextElement(Options option, String value) {
+ private PCLRendererConfBuilder createTextElement(Java2DRendererConfigOption option, String value) {
createTextElement(option.getName(), value);
return this;
}
diff --git a/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java b/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java
index f3071af57..366525ea9 100644
--- a/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java
+++ b/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java
@@ -51,7 +51,7 @@ public class PDFRendererConfigParserTestCase
assertEquals(testPassword, conf.getEncryptionParameters().getUserPassword());
}
- private void testRestrictEncryptionParameter(PDFRendererConfigOptions option)
+ private void testRestrictEncryptionParameter(PDFRendererConfigOption option)
throws Exception {
parseConfig(createRenderer().startEncryptionParams()
.setAllowParam(option)
@@ -62,7 +62,7 @@ public class PDFRendererConfigParserTestCase
assertTrue(testEncryptionParameter(option));
}
- public boolean testEncryptionParameter(PDFRendererConfigOptions option) throws Exception {
+ public boolean testEncryptionParameter(PDFRendererConfigOption option) throws Exception {
switch (option) {
case NO_PRINT:
return conf.getEncryptionParameters().isAllowPrint();
@@ -88,14 +88,14 @@ public class PDFRendererConfigParserTestCase
@Test
public void testAllEncryptionRestrictions() throws Exception {
- testRestrictEncryptionParameter(PDFRendererConfigOptions.NO_PRINT);
- testRestrictEncryptionParameter(PDFRendererConfigOptions.NO_ACCESSCONTENT);
- testRestrictEncryptionParameter(PDFRendererConfigOptions.NO_ANNOTATIONS);
- testRestrictEncryptionParameter(PDFRendererConfigOptions.NO_ASSEMBLEDOC);
- testRestrictEncryptionParameter(PDFRendererConfigOptions.NO_COPY_CONTENT);
- testRestrictEncryptionParameter(PDFRendererConfigOptions.NO_EDIT_CONTENT);
- testRestrictEncryptionParameter(PDFRendererConfigOptions.NO_FILLINFORMS);
- testRestrictEncryptionParameter(PDFRendererConfigOptions.NO_PRINTHQ);
+ testRestrictEncryptionParameter(PDFRendererConfigOption.NO_PRINT);
+ testRestrictEncryptionParameter(PDFRendererConfigOption.NO_ACCESSCONTENT);
+ testRestrictEncryptionParameter(PDFRendererConfigOption.NO_ANNOTATIONS);
+ testRestrictEncryptionParameter(PDFRendererConfigOption.NO_ASSEMBLEDOC);
+ testRestrictEncryptionParameter(PDFRendererConfigOption.NO_COPY_CONTENT);
+ testRestrictEncryptionParameter(PDFRendererConfigOption.NO_EDIT_CONTENT);
+ testRestrictEncryptionParameter(PDFRendererConfigOption.NO_FILLINFORMS);
+ testRestrictEncryptionParameter(PDFRendererConfigOption.NO_PRINTHQ);
}
@Test
diff --git a/test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java b/test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java
index 67bf5b0c8..1b8370787 100644
--- a/test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java
+++ b/test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java
@@ -24,7 +24,7 @@ import org.junit.Test;
import org.apache.fop.apps.AbstractRendererConfigParserTester;
import org.apache.fop.apps.TxtRendererConfBuilder;
import org.apache.fop.render.RendererConfig.RendererConfigParser;
-import org.apache.fop.render.txt.TxtRendererConfig.TxtRendererConfigOptions;
+import org.apache.fop.render.txt.TxtRendererConfig.TxtRendererConfigOption;
import org.apache.fop.render.txt.TxtRendererConfig.TxtRendererConfigParser;
import static org.junit.Assert.assertEquals;
@@ -47,7 +47,7 @@ public class TxtRendererConfigParserTestCase
// Check the default behaviour is expected
parseConfig(createRenderer());
- assertEquals(TxtRendererConfigOptions.ENCODING.getDefaultValue(), conf.getEncoding());
+ assertEquals(TxtRendererConfigOption.ENCODING.getDefaultValue(), conf.getEncoding());
}
}