use of com.revolsys.geometry.test.util.LineNumberSAXBuilder in project com.revolsys.open by revolsys.
the class TestReader method newTestRun.
public TestFile newTestRun(final TestDirectory parent, final File testFile, final int runIndex) throws Throwable {
try {
final SAXBuilder builder = new LineNumberSAXBuilder();
final Document document = builder.build(new FileInputStream(testFile));
final Element runElement = document.getRootElement();
if (!runElement.getName().equalsIgnoreCase("run")) {
throw new TestParseException("Expected <run> but encountered <" + runElement.getName() + ">");
}
return parseTestRun(parent, runElement, testFile, runIndex);
} catch (final IllegalArgumentException e) {
throw e;
} catch (final Exception e) {
throw new IllegalArgumentException("Error parsing " + testFile, e);
}
}
Aggregations