use of org.kie.workbench.common.stunner.lienzo.toolbox.grid.Point2DGrid in project kie-wb-common by kiegroup.
the class CommonActionsToolboxViewTest method testInit.
@Test
public void testInit() {
final CommonActionsToolboxView cascade = doInit();
assertEquals(tested, cascade);
verify(toolboxFactory, times(1)).forWiresShape(eq(shape));
verify(toolboxView, times(1)).attachTo(eq(layer));
// Verify toolbox settings.
verify(toolboxView, times(1)).at(eq(CommonActionsToolboxView.TOOLBOX_AT));
final ArgumentCaptor<Point2DGrid> gridCaptor = ArgumentCaptor.forClass(Point2DGrid.class);
verify(toolboxView, times(1)).grid(gridCaptor.capture());
final AutoGrid grid = (AutoGrid) gridCaptor.getValue();
assertEquals(AbstractActionsToolboxView.BUTTON_SIZE, grid.getIconSize(), 0);
assertEquals(AbstractActionsToolboxView.BUTTON_PADDING, grid.getPadding(), 0);
assertEquals(CommonActionsToolboxView.GRID_TOWARDS, grid.getDirection());
// Verify toolbip.
verify(toolboxTooltip, times(1)).at(CommonActionsToolboxView.TOOLTIP_AT);
verify(toolboxTooltip, times(1)).towards(CommonActionsToolboxView.TOOLTIP_TOWARDS);
}
use of org.kie.workbench.common.stunner.lienzo.toolbox.grid.Point2DGrid in project kie-wb-common by kiegroup.
the class FlowActionsToolboxViewTest method testInit.
@Test
public void testInit() {
final FlowActionsToolboxView cascade = doInit();
assertEquals(tested, cascade);
verify(toolboxFactory, times(1)).forWiresShape(eq(shape));
verify(toolboxView, times(1)).attachTo(eq(layer));
// Verify toolbox settings.
verify(toolboxView, times(1)).at(eq(FlowActionsToolboxView.TOOLBOX_AT));
final ArgumentCaptor<Point2DGrid> gridCaptor = ArgumentCaptor.forClass(Point2DGrid.class);
verify(toolboxView, times(1)).grid(gridCaptor.capture());
final AutoGrid grid = (AutoGrid) gridCaptor.getValue();
assertEquals(AbstractActionsToolboxView.BUTTON_SIZE, grid.getIconSize(), 0);
assertEquals(AbstractActionsToolboxView.BUTTON_PADDING, grid.getPadding(), 0);
assertEquals(FlowActionsToolboxView.GRID_TOWARDS, grid.getDirection());
}
use of org.kie.workbench.common.stunner.lienzo.toolbox.grid.Point2DGrid in project kie-wb-common by kiegroup.
the class MorphActionsToolboxViewTest method assertConfigureToolbox.
private void assertConfigureToolbox() {
verify(toolboxView, times(1)).at(eq(MorphActionsToolboxView.TOOLBOX_AT));
final ArgumentCaptor<Point2DGrid> gridCaptor = ArgumentCaptor.forClass(Point2DGrid.class);
verify(toolboxView, times(1)).grid(gridCaptor.capture());
final FixedLayoutGrid grid = (FixedLayoutGrid) gridCaptor.getValue();
assertEquals(1, grid.getRows());
assertEquals(1, grid.getCols());
assertEquals(AbstractActionsToolboxView.BUTTON_SIZE, grid.getIconSize(), 0);
assertEquals(AbstractActionsToolboxView.BUTTON_PADDING, grid.getPadding(), 0);
}
Aggregations