Search in sources :

Example 1 with PrioritizedCommand

use of org.uberfire.ext.wires.core.grids.client.widget.layer.impl.GridLayerRedrawManager.PrioritizedCommand in project drools-wb by kiegroup.

the class ListBoxSingletonDOMElementFactoryTest method setup.

@Before
public void setup() {
    when(listBox.getElement()).thenReturn(listBoxElement);
    when(listBoxElement.getStyle()).thenReturn(mock(Style.class));
    when(domElementContainer.iterator()).thenReturn(Collections.<Widget>emptyList().iterator());
    when(gridLayer.getDomElementContainer()).thenReturn(domElementContainer);
    when(gridWidget.getModel()).thenReturn(new BaseGridData());
    doAnswer((i) -> {
        final PrioritizedCommand command = (PrioritizedCommand) i.getArguments()[0];
        command.execute();
        return null;
    }).when(gridLayer).batch(any(PrioritizedCommand.class));
    factory = spy(new ListBoxSingletonDOMElementFactoryMock(gridLienzoPanel, gridLayer, gridWidget));
}
Also used : PrioritizedCommand(org.uberfire.ext.wires.core.grids.client.widget.layer.impl.GridLayerRedrawManager.PrioritizedCommand) Widget(com.google.gwt.user.client.ui.Widget) Style(com.google.gwt.dom.client.Style) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Before(org.junit.Before)

Aggregations

Style (com.google.gwt.dom.client.Style)1 Widget (com.google.gwt.user.client.ui.Widget)1 Before (org.junit.Before)1 BaseGridData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData)1 PrioritizedCommand (org.uberfire.ext.wires.core.grids.client.widget.layer.impl.GridLayerRedrawManager.PrioritizedCommand)1