Search in sources :

Example 6 with Validator

use of org.custommonkey.xmlunit.Validator in project wcomponents by BorderTech.

the class AbstractWebXmlRendererTestCase method assertSchemaMatch.

/**
 * Asserts that the given xhtml matches the schema.
 *
 * @param xhtml the xhtml to validate.
 *
 * @throws IOException if there is an I/O error
 * @throws SAXException if there is a parsing error
 */
public void assertSchemaMatch(final String xhtml) throws IOException, SAXException {
    Validator validator = getSchemaValidator(xhtml);
    validator.assertIsValid();
}
Also used : Validator(org.custommonkey.xmlunit.Validator)

Aggregations

Validator (org.custommonkey.xmlunit.Validator)6 StringReader (java.io.StringReader)3 SAXException (org.xml.sax.SAXException)2 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 URL (java.net.URL)1 XpathException (org.custommonkey.xmlunit.exceptions.XpathException)1 InputSource (org.xml.sax.InputSource)1