@Test(expected = ConfigurationException.class) public void shouldMapSAXNotRecognizedException() throws Exception { doThrow(new SAXNotRecognizedException()) .when(parser).setProperty(anyString(), any()); ParsingValidator v = new ParsingValidator(Languages.W3C_XML_SCHEMA_NS_URI); v.validateInstance(new StreamSource(new File(TEST_RESOURCE_DIR + "BookWithDoctype.xml")), fac); }
@Override public ValidationResult validateInstance(Source s) { return validateInstance(s, SAXParserFactory.newInstance()); }
ParsingValidator extends Validator { @Override public ValidationResult validateInstance(Source s) { return validateInstance(s, SAXParserFactory.newInstance()); } }
ParsingValidator extends Validator { @Override public ValidationResult validateInstance(Source s) { return validateInstance(s, SAXParserFactory.newInstance()); } ParsingValidator(String language); }
ParsingValidator extends Validator { @Override public ValidationResult validateInstance(Source s) { return validateInstance(s, SAXParserFactory.newInstance()); } ParsingValidator(String language); void setSchemaURI(String uri); @Override ValidationResult validateSchema(); @Override ValidationResult validateInstance(Source s); ValidationResult validateInstance(Source s, SAXParserFactory factory); }
ParsingValidator extends Validator { @Override public ValidationResult validateInstance(Source s) { return validateInstance(s, SAXParserFactory.newInstance()); } ParsingValidator(String language); void setSchemaURI(String uri); @Override ValidationResult validateSchema(); @Override ValidationResult validateInstance(Source s); ValidationResult validateInstance(Source s, SAXParserFactory factory);  }