Search in sources :

Example 1 with LayoutContainer

use of com.ait.lienzo.client.core.shape.wires.LayoutContainer in project kie-wb-common by kiegroup.

the class WiresShapeViewTest method testMove.

@Test
public void testMove() {
    final LayoutContainer container = mock(LayoutContainer.class);
    final Group group = mock(Group.class);
    when(container.getGroup()).thenReturn(group);
    when(container.refresh()).thenReturn(container);
    when(container.execute()).thenReturn(container);
    when(container.setOffset(any(Point2D.class))).thenReturn(container);
    when(container.setSize(anyDouble(), anyDouble())).thenReturn(container);
    this.tested = new WiresShapeView(PATH, container);
    tested.moveToTop();
    tested.moveToBottom();
    tested.moveUp();
    tested.moveDown();
    verify(group, times(1)).moveToTop();
    verify(group, times(1)).moveToBottom();
    verify(group, times(1)).moveUp();
    verify(group, times(1)).moveDown();
}
Also used : Group(com.ait.lienzo.client.core.shape.Group) LayoutContainer(com.ait.lienzo.client.core.shape.wires.LayoutContainer) Point2D(com.ait.lienzo.client.core.types.Point2D) Test(org.junit.Test)

Aggregations

Group (com.ait.lienzo.client.core.shape.Group)1 LayoutContainer (com.ait.lienzo.client.core.shape.wires.LayoutContainer)1 Point2D (com.ait.lienzo.client.core.types.Point2D)1 Test (org.junit.Test)1