Search in sources :

Example 1 with ExpressionEditorChanged

use of org.kie.workbench.common.dmn.client.widgets.grid.model.ExpressionEditorChanged in project kie-wb-common by kiegroup.

the class DecisionNavigatorObserverTest method testOnNestedElementAdded.

@Test
public void testOnNestedElementAdded() {
    observer.init(presenter);
    observer.onNestedElementAdded(new ExpressionEditorChanged(uuid));
    verify(presenter).refresh();
}
Also used : ExpressionEditorChanged(org.kie.workbench.common.dmn.client.widgets.grid.model.ExpressionEditorChanged) Test(org.junit.Test)

Example 2 with ExpressionEditorChanged

use of org.kie.workbench.common.dmn.client.widgets.grid.model.ExpressionEditorChanged in project kie-wb-common by kiegroup.

the class DMNElementsSynchronizerTest method testOnExpressionEditorChanged.

@Test
public void testOnExpressionEditorChanged() {
    final ExpressionEditorChanged event = mock(ExpressionEditorChanged.class);
    final String id = "id";
    final Node node = mock(Node.class);
    final Optional<Node> nodeOptional = Optional.of(node);
    when(event.getNodeUUID()).thenReturn(id);
    doReturn(nodeOptional).when(synchronizer).getNode(id);
    doNothing().when(synchronizer).synchronizeFromNode(nodeOptional);
    synchronizer.onExpressionEditorChanged(event);
    verify(synchronizer).getNode(id);
    verify(synchronizer).synchronizeFromNode(nodeOptional);
}
Also used : ExpressionEditorChanged(org.kie.workbench.common.dmn.client.widgets.grid.model.ExpressionEditorChanged) Node(org.kie.workbench.common.stunner.core.graph.Node) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 ExpressionEditorChanged (org.kie.workbench.common.dmn.client.widgets.grid.model.ExpressionEditorChanged)2 Node (org.kie.workbench.common.stunner.core.graph.Node)1