use of org.kie.workbench.common.dmn.client.editors.types.listview.constraint.DataTypeConstraint in project kie-wb-common by kiegroup.
the class DataTypeListItemViewTest method testSetupConstraintComponent.
@Test
public void testSetupConstraintComponent() {
final DataTypeConstraint constraintComponent = mock(DataTypeConstraint.class);
final HTMLElement htmlElement = mock(HTMLElement.class);
final Element element = mock(Element.class);
constraint.firstChild = element;
doReturn(constraint).when(view).getConstraintContainer();
when(constraintComponent.getElement()).thenReturn(htmlElement);
when(constraint.removeChild(element)).then(a -> {
constraint.firstChild = null;
return element;
});
view.setupConstraintComponent(constraintComponent);
verify(constraint).removeChild(element);
verify(constraint).appendChild(htmlElement);
}
Aggregations