use of com.archimatetool.model.ISketchModel in project archi by archimatetool.
the class SketchEditPartFactoryTests method testSketchDiagramPart.
@Test
public void testSketchDiagramPart() {
ISketchModel sm = IArchimateFactory.eINSTANCE.createSketchModel();
EditPart editPart = editPartFactory.createEditPart(null, sm);
assertTrue(editPart instanceof SketchDiagramPart);
assertEquals(sm, editPart.getModel());
}
use of com.archimatetool.model.ISketchModel in project archi by archimatetool.
the class DiagramUtilsTests method testCreateViewer_SketchModel.
@Test
public void testCreateViewer_SketchModel() {
IDiagramModel dm = model.getDiagramModels().get(1);
assertTrue(dm instanceof ISketchModel);
Shell shell = new Shell();
GraphicalViewerImpl viewer = DiagramUtils.createViewer(dm, shell);
assertNotNull(viewer);
assertTrue(viewer.getEditPartFactory() instanceof SketchEditPartFactory);
assertTrue(viewer.getRootEditPart() instanceof FreeformGraphicalRootEditPart);
assertSame(dm, viewer.getContents().getModel());
assertSame(shell, viewer.getControl().getShell());
shell.dispose();
}
use of com.archimatetool.model.ISketchModel in project archi by archimatetool.
the class ArchiLabelProviderTests method testGetGraphicsIconForDiagramModel.
@Test
public void testGetGraphicsIconForDiagramModel() {
// Null object
assertNull(ArchiLabelProvider.INSTANCE.getGraphicsIconForDiagramModel(null));
// Models
IArchimateDiagramModel dm = IArchimateFactory.eINSTANCE.createArchimateDiagramModel();
assertNotNull(ArchiLabelProvider.INSTANCE.getGraphicsIconForDiagramModel(dm));
ISketchModel sm = IArchimateFactory.eINSTANCE.createSketchModel();
assertNotNull(ArchiLabelProvider.INSTANCE.getGraphicsIconForDiagramModel(sm));
}
Aggregations