Search in sources :

Example 6 with DecisionTableUIModelMapper

use of org.kie.workbench.common.dmn.client.editors.expressions.types.dtable.DecisionTableUIModelMapper in project kie-wb-common by kiegroup.

the class AddInputClauseCommandTest method setUp.

@Before
public void setUp() throws Exception {
    this.dtable = new DecisionTable();
    this.uiModel = new DMNGridData();
    this.uiModel.appendColumn(uiRowNumberColumn);
    this.inputClause = new InputClause();
    this.uiModelMapper = new DecisionTableUIModelMapper(() -> uiModel, () -> Optional.of(dtable), listSelector, DEFAULT_HEIGHT);
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiInputClauseColumn).getIndex();
}
Also used : DecisionTable(org.kie.workbench.common.dmn.api.definition.model.DecisionTable) DecisionTableUIModelMapper(org.kie.workbench.common.dmn.client.editors.expressions.types.dtable.DecisionTableUIModelMapper) DMNGridData(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData) InputClause(org.kie.workbench.common.dmn.api.definition.model.InputClause) Before(org.junit.Before)

Aggregations

DecisionTableUIModelMapper (org.kie.workbench.common.dmn.client.editors.expressions.types.dtable.DecisionTableUIModelMapper)6 Before (org.junit.Before)5 DecisionTable (org.kie.workbench.common.dmn.api.definition.model.DecisionTable)5 DMNGridData (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData)5 InputClause (org.kie.workbench.common.dmn.api.definition.model.InputClause)2 OutputClause (org.kie.workbench.common.dmn.api.definition.model.OutputClause)2 Test (org.junit.Test)1 DecisionRule (org.kie.workbench.common.dmn.api.definition.model.DecisionRule)1 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)1 CanvasViolation (org.kie.workbench.common.stunner.core.client.command.CanvasViolation)1 GridColumn (org.uberfire.ext.wires.core.grids.client.model.GridColumn)1 GridData (org.uberfire.ext.wires.core.grids.client.model.GridData)1 BaseGridRow (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridRow)1