Search in sources :

Example 1 with RelationUIModelMapper

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

the class AddRelationColumnCommandTest method setup.

@Before
public void setup() {
    this.relation = new Relation();
    this.informationItem = new InformationItem();
    this.uiModel = new BaseGridData();
    this.uiModel.appendColumn(uiRowNumberColumn);
    this.uiModelMapper = new RelationUIModelMapper(() -> uiModel, () -> Optional.of(relation), listSelector);
    makeCommand(1);
    doReturn(ruleManager).when(handler).getRuleManager();
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiModelColumn).getIndex();
}
Also used : RelationUIModelMapper(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapper) Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Before(org.junit.Before)

Example 2 with RelationUIModelMapper

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

the class AddRelationRowCommandTest method setup.

@Before
public void setup() {
    this.relation = new Relation();
    this.row = new List();
    this.uiModelRow = new DMNGridRow();
    this.uiModel = new BaseGridData();
    this.uiModel.appendColumn(uiRowNumberColumn);
    this.uiModelMapper = new RelationUIModelMapper(() -> uiModel, () -> Optional.of(relation), listSelector);
    makeCommand(0);
    doReturn(ruleManager).when(handler).getRuleManager();
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiModelColumn).getIndex();
}
Also used : RelationUIModelMapper(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapper) Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow) List(org.kie.workbench.common.dmn.api.definition.v1_1.List) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Before(org.junit.Before)

Example 3 with RelationUIModelMapper

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

the class DeleteRelationRowCommandTest method setup.

@Before
public void setup() {
    this.relation = new Relation();
    this.relation.getRow().add(new List());
    this.uiModel = new BaseGridData();
    this.uiModel.appendRow(new DMNGridRow());
    this.uiModel.appendColumn(uiRowNumberColumn);
    this.uiModelMapper = new RelationUIModelMapper(() -> uiModel, () -> Optional.of(relation), listSelector);
    makeCommand(0);
    doReturn(ruleManager).when(handler).getRuleManager();
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiModelColumn).getIndex();
}
Also used : RelationUIModelMapper(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapper) Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow) List(org.kie.workbench.common.dmn.api.definition.v1_1.List) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Before(org.junit.Before)

Example 4 with RelationUIModelMapper

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

the class DeleteRelationColumnCommandTest method setup.

@Before
public void setup() {
    this.relation = new Relation();
    this.informationItem = new InformationItem();
    this.relation.getColumn().add(informationItem);
    this.uiModel = new BaseGridData();
    this.uiModel.appendColumn(uiRowNumberColumn);
    this.uiModel.appendColumn(uiModelColumn);
    doReturn(ruleManager).when(handler).getRuleManager();
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiModelColumn).getIndex();
    this.uiModelMapper = new RelationUIModelMapper(() -> uiModel, () -> Optional.of(relation), listSelector);
}
Also used : RelationUIModelMapper(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapper) Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)4 Relation (org.kie.workbench.common.dmn.api.definition.v1_1.Relation)4 RelationUIModelMapper (org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapper)4 BaseGridData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData)4 InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)2 List (org.kie.workbench.common.dmn.api.definition.v1_1.List)2 DMNGridRow (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)2