@Test @SuppressWarnings("unchecked") public void testAcceptSuccess() { when(context.getParent()).thenReturn(parent); when(context.getCandidate()).thenReturn(candidate); final boolean accepts = tested.accepts(RULE, context); assertTrue(accepts); }
@Override public boolean accepts(final CanDock rule, final NodeDockingContext context) { final Set<String> parentLabels = evalUtils.getLabels(context.getParent()); return dockingHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.docking(parentLabels, Collections.emptySet())); }
NodeDockingEvaluationHandler implements RuleEvaluationHandler<CanDock, NodeDockingContext> { @Override public boolean accepts(final CanDock rule, final NodeDockingContext context) { final Set<String> parentLabels = evalUtils.getLabels(context.getParent()); return dockingHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.docking(parentLabels, Collections.emptySet())); } }
NodeDockingEvaluationHandler implements RuleEvaluationHandler<CanDock, NodeDockingContext> { @Override public boolean accepts(final CanDock rule, final NodeDockingContext context) { final Set<String> parentLabels = evalUtils.getLabels(context.getParent()); return dockingHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.docking(parentLabels, Collections.emptySet())); } protected  NodeDockingEvaluationHandler(); @Inject  NodeDockingEvaluationHandler(final DefinitionManager definitionManager,
                                        final DockingEvaluationHandler dockingHandler); }
NodeDockingEvaluationHandler implements RuleEvaluationHandler<CanDock, NodeDockingContext> { @Override public boolean accepts(final CanDock rule, final NodeDockingContext context) { final Set<String> parentLabels = evalUtils.getLabels(context.getParent()); return dockingHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.docking(parentLabels, Collections.emptySet())); } protected  NodeDockingEvaluationHandler(); @Inject  NodeDockingEvaluationHandler(final DefinitionManager definitionManager,
                                        final DockingEvaluationHandler dockingHandler); @Override Class<CanDock> getRuleType(); @Override Class<NodeDockingContext> getContextType(); @Override boolean accepts(final CanDock rule,
                           final NodeDockingContext context); @Override RuleViolations evaluate(final CanDock rule,
                                   final NodeDockingContext context); }
NodeDockingEvaluationHandler implements RuleEvaluationHandler<CanDock, NodeDockingContext> { @Override public boolean accepts(final CanDock rule, final NodeDockingContext context) { final Set<String> parentLabels = evalUtils.getLabels(context.getParent()); return dockingHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.docking(parentLabels, Collections.emptySet())); } protected  NodeDockingEvaluationHandler(); @Inject  NodeDockingEvaluationHandler(final DefinitionManager definitionManager,
                                        final DockingEvaluationHandler dockingHandler); @Override Class<CanDock> getRuleType(); @Override Class<NodeDockingContext> getContextType(); @Override boolean accepts(final CanDock rule,
                           final NodeDockingContext context); @Override RuleViolations evaluate(final CanDock rule,
                                   final NodeDockingContext context);  }