use of com.archimatetool.testingtools.ArchimateTestModel in project archi by archimatetool.
the class DiagramModelUtilsNestedRelationsTests method runOnceBeforeAllTests.
/*
dm
|-- dmo1 (element1)
| |-- dmo2 (element2)
|
|-- dmo3 (element1)
|-- dmo4 (element2)
|-- dmo5 (element3)
*/
@Before
public void runOnceBeforeAllTests() {
tm = new ArchimateTestModel();
model = tm.createNewModel();
dm = model.getDefaultDiagramModel();
// Elements
element1 = IArchimateFactory.eINSTANCE.createBusinessActor();
element2 = IArchimateFactory.eINSTANCE.createBusinessActor();
element3 = IArchimateFactory.eINSTANCE.createBusinessActor();
// A nested type relationship
relationship1 = IArchimateFactory.eINSTANCE.createCompositionRelationship();
relationship1.setSource(element1);
relationship1.setTarget(element2);
model.getArchimateModel().getFolder(FolderType.RELATIONS).getElements().add(relationship1);
// A non-nested type relationship
relationship2 = IArchimateFactory.eINSTANCE.createAssociationRelationship();
relationship2.setSource(element2);
relationship2.setTarget(element3);
model.getArchimateModel().getFolder(FolderType.RELATIONS).getElements().add(relationship2);
// Add some objects to the diagram
dmo1 = tm.createDiagramModelArchimateObjectAndAddToModel(element1);
dm.getChildren().add(dmo1);
dmo2 = tm.createDiagramModelArchimateObjectAndAddToModel(element2);
dmo1.getChildren().add(dmo2);
dmo3 = tm.createDiagramModelArchimateObjectAndAddToModel(element1);
dm.getChildren().add(dmo3);
dmo4 = tm.createDiagramModelArchimateObjectAndAddToModel(element2);
dmo3.getChildren().add(dmo4);
dmo5 = tm.createDiagramModelArchimateObjectAndAddToModel(element3);
dmo4.getChildren().add(dmo5);
}
use of com.archimatetool.testingtools.ArchimateTestModel in project archi by archimatetool.
the class IArchiveManagerTests method testFactory_createArchiveManager.
@Test
public void testFactory_createArchiveManager() throws IOException {
ArchimateTestModel tm = new ArchimateTestModel(TestData.TEST_MODEL_FILE_ARCHISURANCE);
IArchimateModel model = tm.loadModel();
IArchiveManager archiveManager = IArchiveManager.FACTORY.createArchiveManager(model);
assertNotNull(archiveManager);
}
use of com.archimatetool.testingtools.ArchimateTestModel in project archi by archimatetool.
the class ModelCheckerTests method runBeforeEachTest.
@Before
public void runBeforeEachTest() {
tm = new ArchimateTestModel();
model = tm.createNewModel();
modelChecker = new ModelChecker(model);
}
use of com.archimatetool.testingtools.ArchimateTestModel in project archi by archimatetool.
the class ArchiveManagerTests method runBeforeEachTest.
@Before
public void runBeforeEachTest() {
tm = new ArchimateTestModel();
model = tm.createNewModel();
dm = model.getDefaultDiagramModel();
archiveManager = (ArchiveManager) model.getAdapter(IArchiveManager.class);
}
use of com.archimatetool.testingtools.ArchimateTestModel in project archi by archimatetool.
the class DiagramUtilsTests method runOnceBeforeAllTests.
@BeforeClass
public static void runOnceBeforeAllTests() throws IOException {
tm = new ArchimateTestModel(TestSupport.TEST_MODEL_FILE_1);
model = tm.loadModel();
}
Aggregations