use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData in project kie-wb-common by kiegroup.
the class AddOutputClauseCommandTest method setUp.
@Before
public void setUp() throws Exception {
this.dtable = new DecisionTable();
this.uiModel = new DMNGridData();
this.uiModel.appendColumn(uiRowNumberColumn);
this.outputClause = new OutputClause();
this.uiModelMapper = new DecisionTableUIModelMapper(() -> uiModel, () -> Optional.of(dtable), listSelector);
doReturn(0).when(uiRowNumberColumn).getIndex();
doReturn(1).when(uiOutputClauseColumn).getIndex();
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData in project kie-wb-common by kiegroup.
the class DeleteInputClauseCommandTest method setup.
@Before
public void setup() {
this.dtable = new DecisionTable();
this.inputClause = new InputClause();
this.dtable.getInput().add(inputClause);
this.uiModel = new DMNGridData();
this.uiModel.appendColumn(uiRowNumberColumn);
this.uiModel.appendColumn(uiInputClauseColumn);
this.uiModel.appendColumn(uiDescriptionColumn);
this.uiModelMapper = new DecisionTableUIModelMapper(() -> uiModel, () -> Optional.of(dtable), listSelector);
this.command = spy(new DeleteInputClauseCommand(dtable, uiModel, DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT, uiModelMapper, canvasOperation));
doReturn(0).when(uiRowNumberColumn).getIndex();
doReturn(1).when(uiInputClauseColumn).getIndex();
doReturn(2).when(uiDescriptionColumn).getIndex();
}
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 MoveRowsCommandTest method setup.
@Before
public void setup() {
this.invocation = new Invocation();
this.uiModel = new DMNGridData();
doReturn(ruleManager).when(handler).getRuleManager();
doReturn(0).when(uiRowNumberColumn).getIndex();
doReturn(1).when(uiNameColumn).getIndex();
doReturn(2).when(uiExpressionEditorColumn).getIndex();
addParameterBinding(II1);
addParameterBinding(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 CommandUtilsTest method setUp.
@Before
public void setUp() throws Exception {
decisionRuleOne = new DecisionRule();
decisionRuleTwo = new DecisionRule();
decisionRuleThree = new DecisionRule();
decisionRuleOne.setId(new Id("1"));
decisionRuleTwo.setId(new Id("2"));
decisionRuleThree.setId(new Id("3"));
allRows.clear();
allRows.add(decisionRuleOne);
allRows.add(decisionRuleTwo);
allRows.add(decisionRuleThree);
rowsToMove.clear();
uiModel = new DMNGridData();
gridWidget = new BaseGridWidget(uiModel, selectionManager, pinnedModeManager, renderer);
}
Aggregations