use of com.rockwellcollins.atc.tcg.suite.TestCase in project AGREE by loonwerks.
the class TestSuiteDescriptionEditingSupport method getValue.
@Override
protected Object getValue(Object element) {
if (element instanceof TestCase) {
TestCase tc = (TestCase) element;
String desc = tc.getDescription();
return (Object) desc;
}
return null;
}
use of com.rockwellcollins.atc.tcg.suite.TestCase in project AGREE by loonwerks.
the class TestSuiteDescriptionEditingSupport method setValue.
@Override
protected void setValue(Object element, Object value) {
if (element instanceof TestCase) {
TestCase tc = (TestCase) element;
tc.setDescription((String) value);
viewer.update(element, null);
}
}
use of com.rockwellcollins.atc.tcg.suite.TestCase in project AGREE by loonwerks.
the class TcgXmlReader method readSuite.
public void readSuite(TestSuite ts) {
try {
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(xmlStream);
Element docElement = doc.getDocumentElement();
System.out.println("Root element :" + docElement.getNodeName());
ts.setName(getTextElement(docElement, "SuiteName"));
ts.setDescription(getTextElement(docElement, "SuiteDescription"));
ts.setSystemImplUnderTest(getTextElement(docElement, "ImplementationUnderTest"));
List<Element> testElements = getElements(docElement, "Test");
List<TestCase> tests = constructTests(testElements);
ts.setTestCases(tests);
ts.setState(TestSuite.State.LOADED);
} catch (Exception e) {
throw new TcgException("Error parsing XML test suite.", e);
}
}
Aggregations