use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class CanvasModelFactoryTests method testGetNewObjectConnection.
@Test
public void testGetNewObjectConnection() {
ICreationFactory factory = new CanvasModelFactory(ICanvasPackage.eINSTANCE.getCanvasModelConnection(), 2);
ICanvasModelConnection connection = (ICanvasModelConnection) factory.getNewObject();
assertEquals("", connection.getName());
assertEquals(2, connection.getType());
}
use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class CanvasModelFactoryTests method testGetNewObjectCanvasSticky.
@Test
public void testGetNewObjectCanvasSticky() {
ICreationFactory factory = new CanvasModelFactory(ICanvasPackage.eINSTANCE.getCanvasModelSticky(), new RGB(0, 0, 0));
ICanvasModelSticky sticky = (ICanvasModelSticky) factory.getNewObject();
assertEquals("#000000", sticky.getFillColor());
assertEquals("#C0C0C0", sticky.getBorderColor());
}
use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class SketchModelFactoryTests method testGetNewObjectActor.
@Test
public void testGetNewObjectActor() {
ICreationFactory factory = new SketchModelFactory(IArchimatePackage.eINSTANCE.getSketchModelActor());
ISketchModelActor actor = (ISketchModelActor) factory.getNewObject();
assertEquals("Actor", actor.getName());
}
use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class SketchModelFactoryTests method testIsUsedFor.
@Test
public void testIsUsedFor() {
ICreationFactory factory = new SketchModelFactory(null);
assertTrue(factory.isUsedFor(new SketchEditor()));
assertFalse(factory.isUsedFor(new ArchimateDiagramEditor()));
}
use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class SketchModelFactoryTests method testGetNewObjectConnection.
@Test
public void testGetNewObjectConnection() {
ICreationFactory factory = new SketchModelFactory(IArchimatePackage.eINSTANCE.getDiagramModelConnection(), 2);
IDiagramModelConnection connection = (IDiagramModelConnection) factory.getNewObject();
assertEquals("", connection.getName());
assertEquals(2, connection.getType());
}
Aggregations