Browse Source

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
tags/fop-2_0
Mehdi Houshmand 12 years ago
parent
commit
e6fad9f9d8

+ 11
- 1
test/java/org/apache/fop/apps/FopConfBuilder.java View File

/** /**
* Set the <strict-validation> tag within the fop.xconf. * 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 &lt;strict-validation&gt; tag within the fop.xconf.
*
* @param validateStrictly true to enforce strict configuration validation
* @return <b>this</b> * @return <b>this</b>
*/ */
public FopConfBuilder setStrictValidation(boolean validateStrictly) { public FopConfBuilder setStrictValidation(boolean validateStrictly) {

+ 7
- 1
test/java/org/apache/fop/apps/FopConfParserTestCase.java View File

} }


@Test @Test
public void testStrictUserConfigValidation() {
public void testStrictFOValidation() {
builder.setStrictValidation(false); builder.setStrictValidation(false);
assertFalse(buildFactory().validateStrictly()); assertFalse(buildFactory().validateStrictly());
} }


@Test
public void testStrictUserValidation() {
builder.setStrictConfiguration(false);
assertFalse(buildFactory().validateUserConfigStrictly());
}

@Test @Test
public void testAccessibility() { public void testAccessibility() {
builder.setAccessibility(false); builder.setAccessibility(false);

Loading…
Cancel
Save