@Test @SuppressWarnings("unchecked") public void testAcceptSuccess() { when(context.getParent()).thenReturn(element); when(context.getCandidates()).thenReturn(candidates); final boolean accepts = tested.accepts(RULE, context); assertTrue(accepts); }
@Override public boolean accepts(final CanContain rule, final NodeContainmentContext context) { final Set<String> parenteLabels = evalUtils.getLabels(context.getParent()); return containmentHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.containment(parenteLabels, Collections.emptySet())); }
NodeContainmentEvaluationHandler implements RuleEvaluationHandler<CanContain, NodeContainmentContext> { @Override public boolean accepts(final CanContain rule, final NodeContainmentContext context) { final Set<String> parenteLabels = evalUtils.getLabels(context.getParent()); return containmentHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.containment(parenteLabels, Collections.emptySet())); } }
NodeContainmentEvaluationHandler implements RuleEvaluationHandler<CanContain, NodeContainmentContext> { @Override public boolean accepts(final CanContain rule, final NodeContainmentContext context) { final Set<String> parenteLabels = evalUtils.getLabels(context.getParent()); return containmentHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.containment(parenteLabels, Collections.emptySet())); } protected  NodeContainmentEvaluationHandler(); @Inject  NodeContainmentEvaluationHandler(final DefinitionManager definitionManager,
                                            final ContainmentEvaluationHandler containmentHandler); }
NodeContainmentEvaluationHandler implements RuleEvaluationHandler<CanContain, NodeContainmentContext> { @Override public boolean accepts(final CanContain rule, final NodeContainmentContext context) { final Set<String> parenteLabels = evalUtils.getLabels(context.getParent()); return containmentHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.containment(parenteLabels, Collections.emptySet())); } protected  NodeContainmentEvaluationHandler(); @Inject  NodeContainmentEvaluationHandler(final DefinitionManager definitionManager,
                                            final ContainmentEvaluationHandler containmentHandler); @Override Class<CanContain> getRuleType(); @Override Class<NodeContainmentContext> getContextType(); @Override boolean accepts(final CanContain rule,
                           final NodeContainmentContext context); @Override @SuppressWarnings("unchecked") RuleViolations evaluate(final CanContain rule,
                                   final NodeContainmentContext context); }
NodeContainmentEvaluationHandler implements RuleEvaluationHandler<CanContain, NodeContainmentContext> { @Override public boolean accepts(final CanContain rule, final NodeContainmentContext context) { final Set<String> parenteLabels = evalUtils.getLabels(context.getParent()); return containmentHandler.accepts(rule, RuleEvaluationContextBuilder.DomainContexts.containment(parenteLabels, Collections.emptySet())); } protected  NodeContainmentEvaluationHandler(); @Inject  NodeContainmentEvaluationHandler(final DefinitionManager definitionManager,
                                            final ContainmentEvaluationHandler containmentHandler); @Override Class<CanContain> getRuleType(); @Override Class<NodeContainmentContext> getContextType(); @Override boolean accepts(final CanContain rule,
                           final NodeContainmentContext context); @Override @SuppressWarnings("unchecked") RuleViolations evaluate(final CanContain rule,
                                   final NodeContainmentContext context);  }