use of org.kie.workbench.common.dmn.client.widgets.decisionservice.parameters.parametergroup.ParameterGroup in project kie-wb-common by kiegroup.
the class DecisionServiceParametersListWidgetTest method testAddDecisionNodeToGroup.
@Test
public void testAddDecisionNodeToGroup() {
final ParameterGroup group = mock(ParameterGroup.class);
final Node node = mock(Node.class);
final Definition definition = mock(Definition.class);
final Decision decision = mock(Decision.class);
final InformationItemPrimary variable = mock(InformationItemPrimary.class);
final String decisionName = "decision name";
final String type = "type";
final QName typeRef = mock(QName.class);
when(definition.getDefinition()).thenReturn(decision);
when(node.getContent()).thenReturn(definition);
when(decision.getVariable()).thenReturn(variable);
when(decision.getName()).thenReturn(new Name(decisionName));
when(typeRef.getLocalPart()).thenReturn(type);
when(variable.getTypeRef()).thenReturn(typeRef);
widget.addDecisionNodeToGroup(group, node);
verify(group).addParameter(decisionName, type);
}
Aggregations