use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData in project kie-wb-common by kiegroup.
the class BaseExpressionGridGeneralTest method getGrid.
@Override
@SuppressWarnings("unchecked")
public BaseExpressionGrid getGrid() {
final HasExpression hasExpression = mock(HasExpression.class);
final Optional<LiteralExpression> expression = Optional.of(mock(LiteralExpression.class));
final Optional<HasName> hasName = Optional.of(mock(HasName.class));
return new BaseExpressionGrid(parentCell, Optional.empty(), hasExpression, expression, hasName, gridPanel, gridLayer, new GridDataCache.CacheResult(new DMNGridData(), false), renderer, definitionUtils, sessionManager, sessionCommandManager, canvasCommandFactory, cellEditorControls, listSelector, translationService, 0) {
@Override
protected BaseUIModelMapper makeUiModelMapper() {
return mapper;
}
@Override
protected void initialiseUiColumns() {
// Nothing for this test
}
@Override
protected void initialiseUiModel() {
// Nothing for this test
}
@Override
protected boolean isHeaderHidden() {
return false;
}
};
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData in project kie-wb-common by kiegroup.
the class BaseDOMElementSingletonColumnTest method setup.
@Before
public void setup() {
this.model = new DMNGridData();
this.factory = getFactory();
this.domElement = getDomElement();
this.widget = getWidget();
this.gridWidget = getGridWidget();
this.column = getColumn();
when(domElement.getWidget()).thenReturn(widget);
when(gridWidget.getModel()).thenReturn(model);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData in project kie-wb-common by kiegroup.
the class MoveRowsCommandTest method setup.
@Before
public void setup() {
this.context = new Context();
this.uiModel = new DMNGridData();
doReturn(ruleManager).when(handler).getRuleManager();
doReturn(0).when(uiRowNumberColumn).getIndex();
doReturn(1).when(uiNameColumn).getIndex();
doReturn(2).when(uiExpressionEditorColumn).getIndex();
addContextEntry(II1);
addContextEntry(II2);
addUiModelColumn(uiRowNumberColumn);
addUiModelColumn(uiNameColumn);
addUiModelColumn(uiExpressionEditorColumn);
addUiModelRow(0);
addUiModelRow(1);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData in project kie-wb-common by kiegroup.
the class AddDecisionRuleCommandTest method setup.
@Before
public void setup() {
this.dtable = new DecisionTable();
this.rule = new DecisionRule();
this.uiModel = new DMNGridData();
this.uiModel.appendColumn(uiRowNumberColumn);
this.uiModelRow = new DMNGridRow();
this.uiModelMapper = new DecisionTableUIModelMapper(() -> uiModel, () -> Optional.of(dtable), listSelector);
doReturn(0).when(uiRowNumberColumn).getIndex();
doReturn(1).when(uiInputClauseColumn).getIndex();
doReturn(2).when(uiOutputClauseColumn).getIndex();
doReturn(3).when(uiDescriptionColumn).getIndex();
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData in project kie-wb-common by kiegroup.
the class DeleteDecisionRuleCommandTest method setup.
@Before
public void setup() {
this.dtable = new DecisionTable();
this.rule = new DecisionRule();
this.dtable.getRule().add(rule);
this.uiModel = new DMNGridData();
this.uiModelRow = new DMNGridRow();
this.uiModel.appendRow(uiModelRow);
}
Aggregations