Search in sources :

Example 1 with MouseMoveEvent

use of org.kie.workbench.common.stunner.core.client.shape.view.event.MouseMoveEvent in project kie-wb-common by kiegroup.

the class CreateNodeToolboxActionTest method testOnMoveStart.

@Test
public void testOnMoveStart() {
    final MouseMoveEvent event = mock(MouseMoveEvent.class);
    when(event.getX()).thenReturn(100d);
    when(event.getY()).thenReturn(500d);
    tested.onMoveStart(canvasHandler, NODE_UUID, event);
    verify(nodeProxy, times(1)).setCanvasHandler(eq(canvasHandler));
    verify(nodeProxy, times(1)).setSourceNode(eq(element));
    verify(nodeProxy, times(1)).setEdge(eq(edge));
    verify(nodeProxy, times(1)).setTargetNode(eq(targetNode));
    verify(nodeProxy, times(1)).start(eq(event));
}
Also used : MouseMoveEvent(org.kie.workbench.common.stunner.core.client.shape.view.event.MouseMoveEvent) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 MouseMoveEvent (org.kie.workbench.common.stunner.core.client.shape.view.event.MouseMoveEvent)1