use of com.rockwellcollins.atc.tcg.readers.TcgXmlReader in project AGREE by loonwerks.
the class OpenHandler method loadTests.
private TestSuite loadTests() throws TcgException {
try {
Shell activeShell = getWindow().getShell();
syncExec(() -> {
location = TcgPreferenceUtils.getTestCaseOpenFileDialog(activeShell, null);
});
if (location != null) {
InputStream targetStream = new FileInputStream(location);
TestSuite ts = new TestSuite();
TcgXmlReader reader = new TcgXmlReader(targetStream);
reader.readSuite(ts);
ts.setState(TestSuite.State.LOADED);
return ts;
} else {
return null;
}
} catch (IOException e) {
throw new TcgException("Error loading test file", e);
}
}
Aggregations