use of com.ait.lienzo.client.widget.panel.impl.ScalablePanel 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());
}
Aggregations