use of org.apache.sling.repoinit.parser.impl.ParseException in project sling by apache.
the class ParsingErrorsTest method checkResult.
@Test
public void checkResult() throws ParseException, IOException {
final StringReader r = new StringReader(input);
boolean noException = false;
try {
new RepoInitParserImpl(r).parse();
noException = true;
} catch (Exception e) {
assertEquals("for input " + input, expected, e.getClass());
} catch (Error err) {
assertEquals("for input " + input, expected, err.getClass());
} finally {
r.close();
}
if (noException && expected != null) {
fail("Expected a " + expected.getSimpleName() + " for [" + input + "]");
}
}
Aggregations