use of org.kie.workbench.common.stunner.core.client.canvas.event.controlpoint.CanvasControlPointDragEndEvent in project kie-wb-common by kiegroup.
the class ControlPointControlImplTest method setUp.
@Before
public void setUp() {
super.setUp();
initialControlPointPosition = new Point2D(0, 0);
newControlPointPosition = new Point2D(10, 10);
controlPoint1 = new ControlPointImpl(initialControlPointPosition);
canvasSelectionEvent = new CanvasSelectionEvent(canvasHandler, EDGE_UUID);
canvasControlPointDragStartEvent = new CanvasControlPointDragStartEvent(initialControlPointPosition);
canvasControlPointDragEndEvent = new CanvasControlPointDragEndEvent(newControlPointPosition);
canvasControlPointDoubleClickEvent = new CanvasControlPointDoubleClickEvent(initialControlPointPosition);
controlPointControl = spy(new ControlPointControlImpl(canvasCommandFactory));
when(canvas.getShape(EDGE_UUID)).thenReturn(connectorShape);
when(graphIndex.get(EDGE_UUID)).thenReturn(edge);
when(graphIndex.getEdge(EDGE_UUID)).thenReturn(edge);
when(edge.getContent()).thenReturn(viewConnector);
when(edge.getUUID()).thenReturn(EDGE_UUID);
when(connectorShape.getShapeView()).thenReturn(shapeView);
when(viewConnector.getControlPoints()).thenReturn(Arrays.asList(controlPoint1));
controlPointControl.enable(canvasHandler);
controlPointControl.setCommandManagerProvider(() -> commandManager);
controlPointControl.register(edge);
}
Aggregations