Search in sources :

Example 1 with CreationType

use of org.kie.workbench.common.dmn.client.editors.types.persistence.CreationType in project kie-wb-common by kiegroup.

the class DataTypeCreateHandlerTest method testInsertNotNested.

@Test
public void testInsertNotNested() {
    final DataType dataType = mock(DataType.class);
    final DataType reference = mock(DataType.class);
    final ItemDefinition itemDefinition = mock(ItemDefinition.class);
    final List<DataType> expectedAffectedDataTypes = asList(mock(DataType.class), mock(DataType.class));
    final CreationType creationType = ABOVE;
    doReturn(expectedAffectedDataTypes).when(handler).insertSibling(dataType, reference, creationType, itemDefinition);
    final List<DataType> actualAffectedDataTypes = handler.insertSibling(dataType, reference, creationType, itemDefinition);
    assertEquals(expectedAffectedDataTypes, actualAffectedDataTypes);
}
Also used : ItemDefinition(org.kie.workbench.common.dmn.api.definition.model.ItemDefinition) DataType(org.kie.workbench.common.dmn.client.editors.types.common.DataType) CreationType(org.kie.workbench.common.dmn.client.editors.types.persistence.CreationType) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ItemDefinition (org.kie.workbench.common.dmn.api.definition.model.ItemDefinition)1 DataType (org.kie.workbench.common.dmn.client.editors.types.common.DataType)1 CreationType (org.kie.workbench.common.dmn.client.editors.types.persistence.CreationType)1