@Test public void testUpdateText() { final Decision from = mock(Decision.class); final Node to = mock(Node.class); final Name name = mock(Name.class); final String nameValue = "the name"; when(name.getValue()).thenReturn(nameValue); when(from.getName()).thenReturn(name); synchronizer.updateText(from, to); verify(nodeTextSetter).setText(nameValue, to); }
void updateText(final DRGElement from, final Node to) { final String name = from.getName().getValue(); nodeTextSetter.setText(name, to); }
DMNElementsSynchronizer { void updateText(final DRGElement from, final Node to) { final String name = from.getName().getValue(); nodeTextSetter.setText(name, to); } }
DMNElementsSynchronizer { void updateText(final DRGElement from, final Node to) { final String name = from.getName().getValue(); nodeTextSetter.setText(name, to); } @Inject  DMNElementsSynchronizer(final DMNDiagramsSession dmnDiagramsSession,
                                   final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent,
                                   final DMNGraphUtils graphUtils,
                                   final NodeTextSetter nodeTextSetter); }
DMNElementsSynchronizer { void updateText(final DRGElement from, final Node to) { final String name = from.getName().getValue(); nodeTextSetter.setText(name, to); } @Inject  DMNElementsSynchronizer(final DMNDiagramsSession dmnDiagramsSession,
                                   final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent,
                                   final DMNGraphUtils graphUtils,
                                   final NodeTextSetter nodeTextSetter); void onExpressionEditorChanged(final @Observes ExpressionEditorChanged event); void onPropertyChanged(final @Observes FormFieldChanged event); void synchronizeElementsFrom(final DRGElement drgElement); void synchronizeFromNode(final Optional<Node> node); }
DMNElementsSynchronizer { void updateText(final DRGElement from, final Node to) { final String name = from.getName().getValue(); nodeTextSetter.setText(name, to); } @Inject  DMNElementsSynchronizer(final DMNDiagramsSession dmnDiagramsSession,
                                   final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent,
                                   final DMNGraphUtils graphUtils,
                                   final NodeTextSetter nodeTextSetter); void onExpressionEditorChanged(final @Observes ExpressionEditorChanged event); void onPropertyChanged(final @Observes FormFieldChanged event); void synchronizeElementsFrom(final DRGElement drgElement); void synchronizeFromNode(final Optional<Node> node);  }