use of org.kie.workbench.common.stunner.client.lienzo.canvas.wires.WiresLayer in project kie-wb-common by kiegroup.
the class LienzoCanvasExportTest method testWiresLayerBoundsProvider.
@Test
public void testWiresLayerBoundsProvider() {
layer = new Layer();
when(lienzoLayer.getLienzoLayer()).thenReturn(layer);
WiresManager wiresManager = WiresManager.get(layer);
com.ait.lienzo.client.core.shape.wires.WiresLayer wiresLayer = wiresManager.getLayer();
wiresLayer.add(new WiresShape(new MultiPath().rect(0, 0, 50, 50)).setLocation(new Point2D(12, 44)));
wiresLayer.add(new WiresShape(new MultiPath().rect(0, 0, 100, 150)).setLocation(new Point2D(1, 3)));
LienzoCanvasExport.WiresLayerBoundsProvider provider = new LienzoCanvasExport.WiresLayerBoundsProvider();
int[] size0 = provider.compute(lienzoLayer, CanvasExportSettings.build());
assertEquals(0, size0[0]);
assertEquals(0, size0[1]);
assertEquals(151, size0[2]);
assertEquals(203, size0[3]);
}
use of org.kie.workbench.common.stunner.client.lienzo.canvas.wires.WiresLayer in project kie-wb-common by kiegroup.
the class SessionPreviewImplTest method testCompleteRequest.
@Test
public void testCompleteRequest() {
checkCanvasHandler(false, (c) -> {
WiresLayer layer = mock(WiresLayer.class);
when(canvasView.getLayer()).thenReturn(layer);
preview.init();
preview.complete();
verify(layer, times(1)).setSkipDraw(eq(false));
});
}
use of org.kie.workbench.common.stunner.client.lienzo.canvas.wires.WiresLayer in project kie-wb-common by kiegroup.
the class SessionPreviewImplTest method testStartRequest.
@Test
public void testStartRequest() {
checkCanvasHandler(false, (c) -> {
WiresLayer layer = mock(WiresLayer.class);
when(canvasView.getLayer()).thenReturn(layer);
preview.init();
preview.start();
verify(layer, times(1)).setSkipDraw(eq(true));
});
}
Aggregations