Search in sources :

Example 21 with InformationItem

use of org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem in project kie-wb-common by kiegroup.

the class RelationUIModelMapperHelperTest method testGetSectionInformationItemColumnIndexEqualToColumnCount.

@Test(expected = IllegalArgumentException.class)
public void testGetSectionInformationItemColumnIndexEqualToColumnCount() {
    relation.getColumn().add(new InformationItem());
    assertEquals(RelationSection.INFORMATION_ITEM, getInformationItemIndex(relation, relation.getColumn().size() + 1));
}
Also used : InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) Test(org.junit.Test)

Example 22 with InformationItem

use of org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem in project kie-wb-common by kiegroup.

the class RelationUIModelMapperHelperTest method testGetSectionInformationItemColumnNegativeIndex.

@Test(expected = IllegalArgumentException.class)
public void testGetSectionInformationItemColumnNegativeIndex() {
    relation.getColumn().add(new InformationItem());
    assertEquals(RelationSection.INFORMATION_ITEM, getInformationItemIndex(relation, -1));
}
Also used : InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) Test(org.junit.Test)

Example 23 with InformationItem

use of org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem in project kie-wb-common by kiegroup.

the class RelationUIModelMapperHelperTest method testGetSectionNonExistingIndexEqualToColumnCount.

@Test
public void testGetSectionNonExistingIndexEqualToColumnCount() {
    relation.getColumn().add(new InformationItem());
    assertEquals(RelationSection.NONE, getSection(relation, relation.getColumn().size() + 1));
}
Also used : InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) Test(org.junit.Test)

Example 24 with InformationItem

use of org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem in project kie-wb-common by kiegroup.

the class RelationUIModelMapperHelperTest method testGetSectionInformationItemColumn.

@Test
public void testGetSectionInformationItemColumn() {
    relation.getColumn().add(new InformationItem());
    assertEquals(RelationSection.INFORMATION_ITEM, getSection(relation, 1));
}
Also used : InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) Test(org.junit.Test)

Example 25 with InformationItem

use of org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem in project kie-wb-common by kiegroup.

the class RelationUIModelMapperHelperTest method testGetSectionNonExistingNegativeIndex.

@Test
public void testGetSectionNonExistingNegativeIndex() {
    relation.getColumn().add(new InformationItem());
    assertEquals(RelationSection.NONE, getSection(relation, -1));
}
Also used : InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) Test(org.junit.Test)

Aggregations

InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)66 Test (org.junit.Test)33 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)20 Name (org.kie.workbench.common.dmn.api.property.dmn.Name)20 GraphCommandExecutionContext (org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext)19 RuleViolation (org.kie.workbench.common.stunner.core.rule.RuleViolation)18 DMNGridRow (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)12 Before (org.junit.Before)11 ContextEntry (org.kie.workbench.common.dmn.api.definition.v1_1.ContextEntry)11 List (org.kie.workbench.common.dmn.api.definition.v1_1.List)10 Binding (org.kie.workbench.common.dmn.api.definition.v1_1.Binding)8 BaseGridData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData)7 Optional (java.util.Optional)6 InformationItem (org.kie.dmn.model.v1_1.InformationItem)6 HasName (org.kie.workbench.common.dmn.api.definition.HasName)6 Relation (org.kie.workbench.common.dmn.api.definition.v1_1.Relation)6 Description (org.kie.workbench.common.dmn.api.property.dmn.Description)6 Id (org.kie.workbench.common.dmn.api.property.dmn.Id)6 Context (org.kie.workbench.common.dmn.api.definition.v1_1.Context)5 Expression (org.kie.workbench.common.dmn.api.definition.v1_1.Expression)5