use of fvarrui.sysadmin.challenger.test.NotTest in project Challenger4SysAdmins by fvarrui.
the class TreeEditorController method addTest.
private void addTest(NotTest parent) {
TestContextMenu menu = new TestContextMenu();
menu.show(addButton, Side.BOTTOM, 0, 0);
menu.setOnHidden(e -> {
Test childTest = menu.getTest();
if (childTest != null) {
parent.setTest(childTest);
System.out.println("test " + childTest.getName() + " a�adido al test de negaci�n " + parent.getName());
}
});
}
use of fvarrui.sysadmin.challenger.test.NotTest in project Challenger4SysAdmins by fvarrui.
the class TreeEditorController method removeTest.
private void removeTest(Test test) {
Object parent = selectedItem.get().getParent().getValue();
if (parent instanceof Goal) {
Goal goal = (Goal) parent;
goal.setTest(null);
System.out.println("test " + test.getName() + " eliminado del objetivo " + goal.getName());
} else if (parent instanceof TestGroup) {
TestGroup compoundTest = (TestGroup) parent;
compoundTest.getTests().remove(test);
System.out.println("test " + test.getName() + " eliminado del test " + compoundTest.getName());
} else if (parent instanceof NotTest) {
NotTest notTest = (NotTest) parent;
notTest.setTest(null);
System.out.println("test " + test.getName() + " eliminado del test de negaci�n " + notTest.getName());
}
}
Aggregations