Search in sources :

Example 6 with SVGPrimitiveShape

use of org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape in project kie-wb-common by kiegroup.

the class SVGChildViewHandlerTest method testAddChildScalable.

@Test
public void testAddChildScalable() {
    primitiveShape = new SVGPrimitiveShape(rectangle, true, null);
    tested.addChild(primitiveShape);
    verify(shapeView, times(1)).addScalableChild(eq(rectangle));
    assertEquals(1, tested.getChildren().size());
    assertEquals(primitiveShape, tested.getChildren().iterator().next());
}
Also used : SVGPrimitiveShape(org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape) Test(org.junit.Test)

Example 7 with SVGPrimitiveShape

use of org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape in project kie-wb-common by kiegroup.

the class SVGChildViewHandlerTest method testAddChildLayout.

@Test
public void testAddChildLayout() {
    primitiveShape = new SVGPrimitiveShape(rectangle, false, LayoutContainer.Layout.BOTTOM);
    tested.addChild(primitiveShape);
    verify(shapeView, times(1)).addChild(eq(rectangle), eq(LayoutContainer.Layout.BOTTOM));
    assertEquals(1, tested.getChildren().size());
    assertEquals(primitiveShape, tested.getChildren().iterator().next());
}
Also used : SVGPrimitiveShape(org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape) Test(org.junit.Test)

Aggregations

SVGPrimitiveShape (org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape)7 Test (org.junit.Test)4 Group (com.ait.lienzo.client.core.shape.Group)2 Rectangle (com.ait.lienzo.client.core.shape.Rectangle)2 Before (org.junit.Before)2 SVGContainer (org.kie.workbench.common.stunner.svg.client.shape.view.SVGContainer)2