Search in sources :

Example 1 with CheckStorage

use of org.drools.workbench.services.verifier.core.checks.base.CheckStorage in project drools-wb by kiegroup.

the class CheckRunManagerTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    checkStorage = new CheckStorage(new CheckFactory(configuration) {

        @Override
        public HashSet<Check> makeSingleChecks(final RuleInspector ruleInspector) {
            final HashSet<Check> result = new HashSet<>();
            result.add(new MockSingleCheck(ruleInspector));
            return result;
        }
    });
    ruleInspectors = new ArrayList<>();
    when(cache.all()).thenReturn(ruleInspectors);
    ruleInspector1 = mockRowInspector(1);
    ruleInspectors.add(ruleInspector1);
    ruleInspector2 = mockRowInspector(2);
    ruleInspectors.add(ruleInspector2);
    ruleInspector3 = mockRowInspector(3);
    ruleInspectors.add(ruleInspector3);
    checkRunManager.addChecks(ruleInspector1.getChecks());
    checkRunManager.addChecks(ruleInspector2.getChecks());
    checkRunManager.addChecks(ruleInspector3.getChecks());
}
Also used : RuleInspector(org.drools.workbench.services.verifier.core.cache.inspectors.RuleInspector) SingleCheck(org.drools.workbench.services.verifier.core.checks.base.SingleCheck) Check(org.drools.workbench.services.verifier.core.checks.base.Check) CheckFactory(org.drools.workbench.services.verifier.core.checks.base.CheckFactory) CheckStorage(org.drools.workbench.services.verifier.core.checks.base.CheckStorage) HashSet(java.util.HashSet) Before(org.junit.Before)

Aggregations

HashSet (java.util.HashSet)1 RuleInspector (org.drools.workbench.services.verifier.core.cache.inspectors.RuleInspector)1 Check (org.drools.workbench.services.verifier.core.checks.base.Check)1 CheckFactory (org.drools.workbench.services.verifier.core.checks.base.CheckFactory)1 CheckStorage (org.drools.workbench.services.verifier.core.checks.base.CheckStorage)1 SingleCheck (org.drools.workbench.services.verifier.core.checks.base.SingleCheck)1 Before (org.junit.Before)1