use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class SketchModelFactoryTests method testGetNewObjectSticky.
@Test
public void testGetNewObjectSticky() {
ICreationFactory factory = new SketchModelFactory(IArchimatePackage.eINSTANCE.getSketchModelSticky(), ColorFactory.get(201, 231, 183));
ISketchModelSticky sticky = (ISketchModelSticky) factory.getNewObject();
assertEquals("Sticky", sticky.getName());
assertEquals(ColorFactory.convertColorToString(ColorFactory.get(201, 231, 183)), sticky.getFillColor());
}
use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class CanvasModelFactoryTests method testGetNewObjectCanvasBlock.
@Test
public void testGetNewObjectCanvasBlock() {
ICreationFactory factory = new CanvasModelFactory(ICanvasPackage.eINSTANCE.getCanvasModelBlock());
ICanvasModelBlock block = (ICanvasModelBlock) factory.getNewObject();
assertEquals("#000000", block.getBorderColor());
}
use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class CanvasModelFactoryTests method testIsUsedFor.
@Test
public void testIsUsedFor() {
ICreationFactory factory = new CanvasModelFactory(null);
assertTrue(factory.isUsedFor(new CanvasEditor()));
assertFalse(factory.isUsedFor(new SketchEditor()));
assertFalse(factory.isUsedFor(new ArchimateDiagramEditor()));
}
use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class CanvasModelFactoryTests method testGetNewObjectCanvasImage.
@Test
public void testGetNewObjectCanvasImage() {
ICreationFactory factory = new CanvasModelFactory(ICanvasPackage.eINSTANCE.getCanvasModelImage());
ICanvasModelImage image = (ICanvasModelImage) factory.getNewObject();
assertEquals("#000000", image.getBorderColor());
}
use of com.archimatetool.editor.diagram.ICreationFactory in project archi by archimatetool.
the class SketchModelFactoryTests method testGetNewObjectGroup.
@Test
public void testGetNewObjectGroup() {
ICreationFactory factory = new SketchModelFactory(IArchimatePackage.eINSTANCE.getDiagramModelGroup());
IDiagramModelGroup group = (IDiagramModelGroup) factory.getNewObject();
assertEquals("Group", group.getName());
}
Aggregations