use of org.kie.workbench.common.dmn.api.definition.model.ConstraintType.ENUMERATION in project kie-wb-common by kiegroup.
the class DataTypeConstraintTest method testOpenModal.
@Test
public void testOpenModal() {
final DataTypeListItem listItem = mock(DataTypeListItem.class);
final String constraint = "1,2,3";
final String type = "string";
final BiConsumer<String, ConstraintType> onShowConsumer = (s, c) -> {
/* Nothing. */
};
doReturn(listItem).when(dataTypeConstraint).getListItem();
doReturn(constraint).when(dataTypeConstraint).getValue();
doReturn(onShowConsumer).when(dataTypeConstraint).getOnShowConsumer();
when(listItem.getType()).thenReturn(type);
dataTypeConstraint.openModal();
constraintModal.load(type, constraint, ENUMERATION);
constraintModal.show(onShowConsumer);
}
Aggregations