@Test public void testShouldKeepChildrenWhenIsNotDecisionService() { final Object decisionService = mock(Object.class); final Node<Definition<?>, Edge> candidate = mock(Node.class); final DMNSafeDeleteNodeCommand cmd = createMock(decisionService, candidate); final boolean actual = cmd.shouldKeepChildren(candidate); assertFalse(actual); }
@Override public boolean shouldKeepChildren(final Node<Definition<?>, Edge> candidate) { return DefinitionUtils.getElementDefinition(candidate) instanceof DecisionService; }
DMNSafeDeleteNodeCommand extends SafeDeleteNodeCommand { @Override public boolean shouldKeepChildren(final Node<Definition<?>, Edge> candidate) { return DefinitionUtils.getElementDefinition(candidate) instanceof DecisionService; } }
DMNSafeDeleteNodeCommand extends SafeDeleteNodeCommand { @Override public boolean shouldKeepChildren(final Node<Definition<?>, Edge> candidate) { return DefinitionUtils.getElementDefinition(candidate) instanceof DecisionService; } DMNSafeDeleteNodeCommand(final Node<?, Edge> node,
                                    final SafeDeleteNodeCommandCallback safeDeleteCallback,
                                    final Options options,
                                    final GraphsProvider graphsProvider); }
DMNSafeDeleteNodeCommand extends SafeDeleteNodeCommand { @Override public boolean shouldKeepChildren(final Node<Definition<?>, Edge> candidate) { return DefinitionUtils.getElementDefinition(candidate) instanceof DecisionService; } DMNSafeDeleteNodeCommand(final Node<?, Edge> node,
                                    final SafeDeleteNodeCommandCallback safeDeleteCallback,
                                    final Options options,
                                    final GraphsProvider graphsProvider); @Override boolean shouldKeepChildren(final Node<Definition<?>, Edge> candidate); @Override GraphsProvider getGraphsProvider(); }
DMNSafeDeleteNodeCommand extends SafeDeleteNodeCommand { @Override public boolean shouldKeepChildren(final Node<Definition<?>, Edge> candidate) { return DefinitionUtils.getElementDefinition(candidate) instanceof DecisionService; } DMNSafeDeleteNodeCommand(final Node<?, Edge> node,
                                    final SafeDeleteNodeCommandCallback safeDeleteCallback,
                                    final Options options,
                                    final GraphsProvider graphsProvider); @Override boolean shouldKeepChildren(final Node<Definition<?>, Edge> candidate); @Override GraphsProvider getGraphsProvider();  }