use of com.rockwellcollins.atc.tcg.suite.TestCase in project AGREE by loonwerks.
the class TcgXmlWriter method writeSuite.
@Override
public void writeSuite(TestSuite ts) {
begin(ts.getName(), ts.getDescription(), ts.getSystemImplUnderTest());
for (TestCase test : ts.getTestCases()) {
writeTest(test);
}
end();
}
use of com.rockwellcollins.atc.tcg.suite.TestCase in project AGREE by loonwerks.
the class TestSuiteNameEditingSupport method setValue.
@Override
protected void setValue(Object element, Object value) {
if (element instanceof TestCase) {
TestCase tc = (TestCase) element;
tc.setName((String) value);
viewer.update(element, null);
}
}
use of com.rockwellcollins.atc.tcg.suite.TestCase in project AGREE by loonwerks.
the class TcgXmlReader method constructTests.
public List<TestCase> constructTests(List<Element> testElements) {
List<TestCase> testCases = new ArrayList<>();
for (Element elem : testElements) {
String name = elem.getAttribute("name");
String description = getTextElement(elem, "Description");
int length = Integer.parseInt(getTextElement(elem, "Length"));
Counterexample cex = getCounterexample(elem, length);
TestCase tc = new TestCase(name, description, cex);
testCases.add(tc);
}
return testCases;
}
use of com.rockwellcollins.atc.tcg.suite.TestCase in project AGREE by loonwerks.
the class TestSuiteMenuListener method menuAboutToShow.
@Override
public void menuAboutToShow(IMenuManager manager) {
IStructuredSelection selection = (IStructuredSelection) table.getViewer().getSelection();
if (!selection.isEmpty()) {
TestCase testCase = (TestCase) selection.getFirstElement();
addLinkedMenus(manager, testCase);
}
}
use of com.rockwellcollins.atc.tcg.suite.TestCase in project AGREE by loonwerks.
the class TestSuiteNameEditingSupport method getValue.
@Override
protected Object getValue(Object element) {
if (element instanceof TestCase) {
TestCase tc = (TestCase) element;
String desc = tc.getName();
return (Object) desc;
}
return null;
}
Aggregations