Search in sources :

Example 1 with AutoGrid

use of com.ait.lienzo.client.core.shape.toolbox.grid.AutoGrid 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(topLayer));
    // 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);
}
Also used : Point2DGrid(com.ait.lienzo.client.core.shape.toolbox.grid.Point2DGrid) AutoGrid(com.ait.lienzo.client.core.shape.toolbox.grid.AutoGrid) Test(org.junit.Test)

Example 2 with AutoGrid

use of com.ait.lienzo.client.core.shape.toolbox.grid.AutoGrid 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(topLayer));
    // 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());
}
Also used : Point2DGrid(com.ait.lienzo.client.core.shape.toolbox.grid.Point2DGrid) AutoGrid(com.ait.lienzo.client.core.shape.toolbox.grid.AutoGrid) Test(org.junit.Test)

Aggregations

AutoGrid (com.ait.lienzo.client.core.shape.toolbox.grid.AutoGrid)2 Point2DGrid (com.ait.lienzo.client.core.shape.toolbox.grid.Point2DGrid)2 Test (org.junit.Test)2