use of org.kie.workbench.common.stunner.forms.client.event.FormFieldChanged in project kie-wb-common by kiegroup.
the class MultipleInstanceNodeFilterProviderTest method mockFormFieldChanged.
protected FormFieldChanged mockFormFieldChanged(String fieldName, String uuid) {
FormFieldChanged formFieldChanged = mock(FormFieldChanged.class);
when(formFieldChanged.getName()).thenReturn(fieldName);
when(formFieldChanged.getUuid()).thenReturn(uuid);
return formFieldChanged;
}
use of org.kie.workbench.common.stunner.forms.client.event.FormFieldChanged in project kie-wb-common by kiegroup.
the class BPMNDocumentationViewTest method onFormFieldChanged.
@Test
public void onFormFieldChanged() {
tested.setIsSelected(() -> true);
tested.onFormFieldChanged(new FormFieldChanged(null, null, "uuid"));
verify(tested).refresh();
}
use of org.kie.workbench.common.stunner.forms.client.event.FormFieldChanged in project kie-wb-common by kiegroup.
the class BPMNDocumentationViewTest method onFormFieldChangedNotExists.
@Test
public void onFormFieldChangedNotExists() {
tested.onFormFieldChanged(new FormFieldChanged(null, null, "uuid2"));
verify(tested, never()).refresh();
}
use of org.kie.workbench.common.stunner.forms.client.event.FormFieldChanged in project kie-wb-common by kiegroup.
the class BPMNDocumentationViewTest method onFormFieldChangedNotActive.
@Test
public void onFormFieldChangedNotActive() {
tested.setIsSelected(() -> false);
tested.onFormFieldChanged(new FormFieldChanged(null, null, "uuid"));
verify(tested, never()).refresh();
}
use of org.kie.workbench.common.stunner.forms.client.event.FormFieldChanged in project kie-wb-common by kiegroup.
the class DMNElementsSynchronizerTest method testOnPropertyChanged.
@Test
public void testOnPropertyChanged() {
final FormFieldChanged event = mock(FormFieldChanged.class);
final String id = "id";
final Node node = mock(Node.class);
final Optional<Node> nodeOptional = Optional.of(node);
when(event.getUuid()).thenReturn(id);
doReturn(nodeOptional).when(synchronizer).getNode(id);
doNothing().when(synchronizer).synchronizeFromNode(nodeOptional);
synchronizer.onPropertyChanged(event);
verify(synchronizer).getNode(id);
verify(synchronizer).synchronizeFromNode(nodeOptional);
}
Aggregations