use of com.ait.lienzo.client.widget.panel.LienzoBoundsPanel in project kie-wb-common by kiegroup.
the class ScrollableLienzoPanelTest method testRefresh.
@Test
@SuppressWarnings("unchecked")
public void testRefresh() {
LienzoBoundsPanel view = mock(LienzoBoundsPanel.class);
when(panel.getView()).thenReturn(view);
tested.refresh();
verify(view, times(1)).refresh();
}
use of com.ait.lienzo.client.widget.panel.LienzoBoundsPanel in project kie-wb-common by kiegroup.
the class ScalableLienzoPanelTest method testInit.
@Test
@SuppressWarnings("unchecked")
public void testInit() {
tested.init();
ArgumentCaptor<BiFunction> builderCaptor = ArgumentCaptor.forClass(BiFunction.class);
verify(panel, times(1)).setPanelBuilder(builderCaptor.capture());
BiFunction<OptionalInt, OptionalInt, LienzoBoundsPanel> builder = builderCaptor.getValue();
LienzoBoundsPanel result = builder.apply(OptionalInt.of(300), OptionalInt.of(450));
assertTrue(result instanceof ScalablePanel);
assertEquals(300, result.getWidthPx());
assertEquals(450, result.getHeightPx());
}
use of com.ait.lienzo.client.widget.panel.LienzoBoundsPanel in project kie-wb-common by kiegroup.
the class PreviewLienzoPanelTest method testInit.
@Test
@SuppressWarnings("unchecked")
public void testInit() {
tested.init();
ArgumentCaptor<BiFunction> builderCaptor = ArgumentCaptor.forClass(BiFunction.class);
verify(panel, times(1)).setPanelBuilder(builderCaptor.capture());
BiFunction<OptionalInt, OptionalInt, LienzoBoundsPanel> builder = builderCaptor.getValue();
LienzoBoundsPanel result = builder.apply(OptionalInt.of(300), OptionalInt.of(450));
assertTrue(result instanceof PreviewPanel);
assertEquals(300, result.getWidthPx());
assertEquals(450, result.getHeightPx());
}
use of com.ait.lienzo.client.widget.panel.LienzoBoundsPanel in project kie-wb-common by kiegroup.
the class LienzoCanvasViewTest method testCursor.
@Test
public void testCursor() {
LienzoBoundsPanel panelView = mock(LienzoBoundsPanel.class);
when(panel.getView()).thenReturn(panelView);
tested.initialize(panel, settings);
tested.setCursor(AbstractCanvas.Cursors.MOVE);
verify(panelView, times(1)).setCursor(eq(Style.Cursor.MOVE));
}
use of com.ait.lienzo.client.widget.panel.LienzoBoundsPanel in project kie-wb-common by kiegroup.
the class ScrollableLienzoPanelTest method testInit.
@Test
@SuppressWarnings("unchecked")
public void testInit() {
tested.init();
ArgumentCaptor<BiFunction> builderCaptor = ArgumentCaptor.forClass(BiFunction.class);
verify(panel, times(1)).setPanelBuilder(builderCaptor.capture());
BiFunction<OptionalInt, OptionalInt, LienzoBoundsPanel> builder = builderCaptor.getValue();
LienzoBoundsPanel result = builder.apply(OptionalInt.of(300), OptionalInt.of(450));
assertTrue(result instanceof ScrollableLienzoPanelView);
assertEquals(300, result.getWidthPx());
assertEquals(450, result.getHeightPx());
}
Aggregations