use of org.uberfire.ext.wires.core.grids.client.model.GridCell in project drools-wb by kiegroup.
the class GuidedDecisionTableModellerContextMenuSupportTest method onContextMenuWithoutCellSelectionManager.
@Test
@SuppressWarnings("unchecked")
public void onContextMenuWithoutCellSelectionManager() {
final GuidedDecisionTableView.Presenter dtPresenter = makeDecisionTable();
final GridData uiModel = dtPresenter.getView().getModel();
final GridColumn uiColumn = new RowNumberColumn();
uiModel.appendColumn(uiColumn);
when(columnInformation.getColumn()).thenReturn(uiColumn);
when(modellerPresenter.getAvailableDecisionTables()).thenReturn(new HashSet<GuidedDecisionTableView.Presenter>() {
{
add(dtPresenter);
}
});
final GridCell uiCell = mock(GridCell.class);
when(uiModel.getCell(any(Integer.class), any(Integer.class))).thenReturn(uiCell);
when(uiCell.getSelectionStrategy()).thenReturn(null);
final ContextMenuHandler handler = contextMenuSupport.getContextMenuHandler(modellerPresenter);
handler.onContextMenu(event);
verify(layer, never()).batch();
}
Aggregations