Methods Summary |
---|
public void | setUp()The JUnit setup method
configureProject(TASKDEFS_DIR + "xmlvalidate.xml");
|
public void | tearDown()The teardown method for JUnit
|
public void | testDeepValidate()Test indirect validation.
executeTarget("testDeepValidate");
|
public void | testIso2022Jp()iso-2022-jp.xml is valid but wouldn't get recognized on systems
with a different native encoding.
Bug 11279
executeTarget("testIso2022Jp");
|
public void | testPropertySchemaForInvalidXML()
expectBuildException(
"testProperty.invalidXML",
"XML file does not satisfy schema.");
|
public void | testPropertySchemaForValidXML()
executeTarget("testProperty.validXML");
|
public void | testUtf8()utf-8.xml is invalid as it contains non-UTF-8 characters, but
would pass on systems with a native iso-8859-1 (or similar)
encoding.
Bug 11279
expectBuildException("testUtf8", "invalid characters in file");
|
public void | testValidate()Basic inline 'dtd' element test.
executeTarget("testValidate");
|
public void | testXmlCatalog()
executeTarget("xmlcatalog");
|
public void | testXmlCatalogFiles()Test that the nested dtd element is used when resolver.jar is not
present. This test should pass either way.
executeTarget("xmlcatalogfiles-override");
|
public void | testXmlCatalogNested()Test nested xmlcatalog definitions
executeTarget("xmlcatalognested");
|
public void | testXmlCatalogPath()Test nested catalogpath.
Test that the nested dtd element is used when resolver.jar is not
present. This test should pass either way.
executeTarget("xmlcatalogpath-override");
|
public void | testXmlCatalogViaRefid()
executeTarget("xmlcatalogViaRefid");
|
public void | testXmlSchemaBad()Test xml schema validation
try {
executeTarget("testSchemaBad");
fail("Should throw BuildException because 'Bad Schema Validation'");
expectBuildExceptionContaining(
"testSchemaBad",
"Bad Schema Validation",
"not a valid XML document");
} catch (BuildException e) {
if (e
.getMessage()
.endsWith(" doesn't recognize feature http://apache.org/xml/features/validation/schema")
|| e.getMessage().endsWith(
" doesn't support feature http://apache.org/xml/features/validation/schema")) {
System.err.println(" skipped, parser doesn't support schema");
} else {
assertTrue(
e.getMessage().indexOf("not a valid XML document") > -1);
}
}
|
public void | testXmlSchemaGood()Test xml schema validation
try {
executeTarget("testSchemaGood");
} catch (BuildException e) {
if (e
.getMessage()
.endsWith(" doesn't recognize feature http://apache.org/xml/features/validation/schema")
|| e.getMessage().endsWith(
" doesn't support feature http://apache.org/xml/features/validation/schema")) {
System.err.println(" skipped, parser doesn't support schema");
} else {
throw e;
}
}
|