diff options
author | Mehdi Houshmand <mehdi@apache.org> | 2012-07-05 09:36:27 +0000 |
---|---|---|
committer | Mehdi Houshmand <mehdi@apache.org> | 2012-07-05 09:36:27 +0000 |
commit | e6fad9f9d8e9136f56a43a2f1c7cfdd9d43510e3 (patch) | |
tree | 538dd94710d08194f140c76856e3190b673c2a49 /test | |
parent | 6087e3d7085791007f1cd997f5a114348442351d (diff) | |
download | xmlgraphics-fop-e6fad9f9d8e9136f56a43a2f1c7cfdd9d43510e3.tar.gz xmlgraphics-fop-e6fad9f9d8e9136f56a43a2f1c7cfdd9d43510e3.zip |
Added test for strict user configuration setting within the fop-conf
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1357527 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/java/org/apache/fop/apps/FopConfBuilder.java | 12 | ||||
-rw-r--r-- | test/java/org/apache/fop/apps/FopConfParserTestCase.java | 8 |
2 files changed, 18 insertions, 2 deletions
diff --git a/test/java/org/apache/fop/apps/FopConfBuilder.java b/test/java/org/apache/fop/apps/FopConfBuilder.java index 1efb2d698..8dd882d8a 100644 --- a/test/java/org/apache/fop/apps/FopConfBuilder.java +++ b/test/java/org/apache/fop/apps/FopConfBuilder.java @@ -113,7 +113,17 @@ public class FopConfBuilder implements FontConfigurator<FopConfBuilder> { /** * Set the <strict-validation> tag within the fop.xconf. * - * @param validateStrictly true to enforce strict validation + * @param validateStrictly true to enforce strict FO validation + * @return <b>this</b> + */ + public FopConfBuilder setStrictConfiguration(boolean validateStrictly) { + return createElement("strict-configuration", String.valueOf(validateStrictly)); + } + + /** + * Set the <strict-validation> tag within the fop.xconf. + * + * @param validateStrictly true to enforce strict configuration validation * @return <b>this</b> */ public FopConfBuilder setStrictValidation(boolean validateStrictly) { diff --git a/test/java/org/apache/fop/apps/FopConfParserTestCase.java b/test/java/org/apache/fop/apps/FopConfParserTestCase.java index 775bca30a..3c2930942 100644 --- a/test/java/org/apache/fop/apps/FopConfParserTestCase.java +++ b/test/java/org/apache/fop/apps/FopConfParserTestCase.java @@ -75,12 +75,18 @@ public class FopConfParserTestCase { } @Test - public void testStrictUserConfigValidation() { + public void testStrictFOValidation() { builder.setStrictValidation(false); assertFalse(buildFactory().validateStrictly()); } @Test + public void testStrictUserValidation() { + builder.setStrictConfiguration(false); + assertFalse(buildFactory().validateUserConfigStrictly()); + } + + @Test public void testAccessibility() { builder.setAccessibility(false); assertFalse(buildFactory().isAccessibilityEnabled()); |