Search in sources :

Example 1 with RuleExecutorConfiguration

use of com.buschmais.jqassistant.core.rule.api.executor.RuleExecutorConfiguration in project jqa-core-framework by buschmais.

the class RuleHelper method getAllRules.

/**
     * Determines all rules.
     * 
     * @param ruleSet
     *            The rule set.
     * @return The visitor with all valid and missing rules.
     * @throws RuleExecutorException
     *             If the rules cannot be evaluated.
     */
private CollectRulesVisitor getAllRules(RuleSet ruleSet, RuleSelection ruleSelection) throws RuleExecutorException {
    CollectRulesVisitor visitor = new CollectRulesVisitor();
    RuleExecutor executor = new RuleExecutor(visitor, new RuleExecutorConfiguration());
    executor.execute(ruleSet, ruleSelection);
    return visitor;
}
Also used : RuleExecutor(com.buschmais.jqassistant.core.rule.api.executor.RuleExecutor) CollectRulesVisitor(com.buschmais.jqassistant.core.rule.api.executor.CollectRulesVisitor) RuleExecutorConfiguration(com.buschmais.jqassistant.core.rule.api.executor.RuleExecutorConfiguration)

Example 2 with RuleExecutorConfiguration

use of com.buschmais.jqassistant.core.rule.api.executor.RuleExecutorConfiguration in project jqa-core-framework by buschmais.

the class RuleExecutorTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new RuleExecutorConfiguration();
    ruleExecutor = new RuleExecutor(visitor, configuration);
    defaultConcept = Concept.Builder.newConcept().id("concept:Default").severity(Severity.MAJOR).get();
    overriddenConcept = Concept.Builder.newConcept().id("concept:Overridden").severity(Severity.MAJOR).get();
    defaultConstraint = Constraint.Builder.newConstraint().id("constraint:Default").severity(Severity.MAJOR).get();
    overriddenConstraint = Constraint.Builder.newConstraint().id("constraint:Overridden").severity(Severity.MAJOR).get();
}
Also used : RuleExecutor(com.buschmais.jqassistant.core.rule.api.executor.RuleExecutor) RuleExecutorConfiguration(com.buschmais.jqassistant.core.rule.api.executor.RuleExecutorConfiguration) Before(org.junit.Before)

Aggregations

RuleExecutor (com.buschmais.jqassistant.core.rule.api.executor.RuleExecutor)2 RuleExecutorConfiguration (com.buschmais.jqassistant.core.rule.api.executor.RuleExecutorConfiguration)2 CollectRulesVisitor (com.buschmais.jqassistant.core.rule.api.executor.CollectRulesVisitor)1 Before (org.junit.Before)1