use of org.kie.workbench.common.dmn.client.widgets.decisionservice.parameters.parametergroup.ParameterGroup.ParameterItem in project kie-wb-common by kiegroup.
the class ParameterGroupTest method testAddParameter.
@Test
public void testAddParameter() {
final String name = "name";
final String type = "type";
final HTMLElement htmlElement = mock(HTMLElement.class);
final ParameterItem parameterItem = mock(ParameterItem.class);
final elemental2.dom.HTMLElement element = mock(elemental2.dom.HTMLElement.class);
doReturn(parameterItem).when(parameterGroup).createParameterItem();
when(parameterItem.getElement()).thenReturn(htmlElement);
when(util.asHTMLElement(htmlElement)).thenReturn(element);
parameterGroup.addParameter(name, type);
verify(util).asHTMLElement(htmlElement);
verify(parameters).appendChild(element);
verify(parameterGroup).refreshNone();
assertFalse(parameterGroup.isEmpty());
}
Aggregations