use of com.archimatetool.testingtools.ArchimateTestEditor in project archi by archimatetool.
the class DiagramEditorFindReplaceProviderTests method runOnceBeforeAllTests.
@BeforeClass
public static void runOnceBeforeAllTests() throws IOException {
tm = new ArchimateTestModel(new File(TestSupport.getTestDataFolder(), "models/testFindReplace.archimate"));
model = tm.loadModelWithCommandStack();
dm = (IArchimateDiagramModel) ArchimateModelUtils.getObjectByID(model, "6a346079");
editor = new ArchimateTestEditor();
editor.setDiagramModel(dm);
}
use of com.archimatetool.testingtools.ArchimateTestEditor in project archi by archimatetool.
the class SelectAllActionTests method testSelectAll.
@Test
public void testSelectAll() throws Exception {
ArchimateTestEditor editor = new ArchimateTestEditor();
ArchimateTestModel tm = new ArchimateTestModel(TestData.TEST_MODEL_FILE_ARCHISURANCE);
IArchimateModel model = tm.loadModelWithCommandStack();
IArchimateDiagramModel dm = (IArchimateDiagramModel) ArchimateModelUtils.getObjectByID(model, "4165");
editor.setDiagramModel(dm);
SelectAllAction action = new SelectAllAction(mock(IWorkbenchPart.class));
Set<GraphicalEditPart> selected = action.getSelectableEditParts(editor.getGraphicalViewer().getContents());
assertEquals(47, selected.size());
editor.dispose();
}
use of com.archimatetool.testingtools.ArchimateTestEditor in project archi by archimatetool.
the class AbstractDiagramModelObjectFigureTests method runOnceBeforeAllTests.
@BeforeClass
public static void runOnceBeforeAllTests() {
// Create a new model, get the default DiagramModel and open the test editor
tm = new ArchimateTestModel();
model = tm.createNewModel();
dm = (IArchimateDiagramModel) model.getDefaultDiagramModel();
editor = new ArchimateTestEditor();
editor.setDiagramModel(dm);
}
Aggregations