use of org.kie.workbench.common.dmn.client.editors.expressions.types.context.InformationItemCell.HasNameAndDataTypeCell in project kie-wb-common by kiegroup.
the class InformationItemCellInformationItemTest method testHasNameAndDataTypeCellGetHasTypeRefs.
@Test
public void testHasNameAndDataTypeCellGetHasTypeRefs() {
final InformationItem informationItem = mock(InformationItem.class);
final HasNameAndDataTypeCell hasNameAndDataTypeCell = HasNameAndDataTypeCell.wrap(informationItem);
final HasTypeRef hasTypeRef1 = mock(HasTypeRef.class);
final HasTypeRef hasTypeRef2 = mock(HasTypeRef.class);
final List<HasTypeRef> expectedHasTypeRefs = asList(hasTypeRef1, hasTypeRef2);
when(informationItem.getHasTypeRefs()).thenReturn(expectedHasTypeRefs);
final List<HasTypeRef> actualHasTypeRefs = hasNameAndDataTypeCell.getHasTypeRefs();
assertEquals(expectedHasTypeRefs, actualHasTypeRefs);
}
use of org.kie.workbench.common.dmn.client.editors.expressions.types.context.InformationItemCell.HasNameAndDataTypeCell in project kie-wb-common by kiegroup.
the class EditableNameAndDataTypeColumnTest method testEditSetTypeRefChanged.
@Test
public void testEditSetTypeRefChanged() {
mockEditAction();
final HasValueAndTypeRef<Name> hasValueAndTypeRef = hasNameAndDataTypeControlCaptor.getValue();
final QName feel = new QName(DMNModelInstrumentedBase.Namespace.DMN.getUri(), "", DMNModelInstrumentedBase.Namespace.DMN.getPrefix());
hasValueAndTypeRef.setTypeRef(feel);
verify(setTypeRefConsumer).accept(eq((HasNameAndDataTypeCell) cell.getValue().getValue()), eq(feel));
}
Aggregations