@Test public void testDefinitionContainsDRGElement_WhenDoesNotContains() { final Node node = mock(Node.class); final Definition definition = mock(Definition.class); final Object obj = mock(Object.class); when(definition.getDefinition()).thenReturn(obj); when(node.getContent()).thenReturn(definition); final boolean containsDRGElement = synchronizer.definitionContainsDRGElement(node); assertFalse(containsDRGElement); }
boolean definitionContainsDRGElement(final Node node) { return node.getContent() instanceof Definition && ((Definition) node.getContent()).getDefinition() instanceof DRGElement; }
DMNElementsSynchronizer { boolean definitionContainsDRGElement(final Node node) { return node.getContent() instanceof Definition && ((Definition) node.getContent()).getDefinition() instanceof DRGElement; } }
DMNElementsSynchronizer { boolean definitionContainsDRGElement(final Node node) { return node.getContent() instanceof Definition && ((Definition) node.getContent()).getDefinition() instanceof DRGElement; } @Inject  DMNElementsSynchronizer(final DMNDiagramsSession dmnDiagramsSession,
                                   final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent,
                                   final DMNGraphUtils graphUtils,
                                   final NodeTextSetter nodeTextSetter); }
DMNElementsSynchronizer { boolean definitionContainsDRGElement(final Node node) { return node.getContent() instanceof Definition && ((Definition) node.getContent()).getDefinition() instanceof DRGElement; } @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 { boolean definitionContainsDRGElement(final Node node) { return node.getContent() instanceof Definition && ((Definition) node.getContent()).getDefinition() instanceof DRGElement; } @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);  }