Search in sources :

Example 21 with AnalyzerConfigurationMock

use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.

the class ConditionsListenerTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    conditions = new Conditions();
    allListener = mock(AllListener.class);
    conditions.where(Condition.value().any()).listen().all(allListener);
}
Also used : AllListener(org.drools.verifier.core.index.select.AllListener) AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) Conditions(org.drools.verifier.core.index.model.Conditions) Before(org.junit.Before)

Example 22 with AnalyzerConfigurationMock

use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.

the class QueryableIndexTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    final Rules rules = new Rules();
    rules.add(new Rule(0, configuration));
    rules.add(new Rule(1, configuration));
    rules.add(new Rule(2, configuration));
    final Columns columns = new Columns();
    firstColumn = new Column(0, configuration);
    columns.add(firstColumn);
    columns.add(new Column(1, configuration));
    final ObjectTypes objectTypes = new ObjectTypes();
    objectTypes.add(new ObjectType("Person", configuration));
    objectTypes.add(new ObjectType("Address", configuration));
    queryableIndex = new QueryableIndex(rules, columns, objectTypes);
}
Also used : ObjectType(org.drools.verifier.core.index.model.ObjectType) Column(org.drools.verifier.core.index.model.Column) AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) Columns(org.drools.verifier.core.index.model.Columns) ObjectTypes(org.drools.verifier.core.index.model.ObjectTypes) Rule(org.drools.verifier.core.index.model.Rule) Rules(org.drools.verifier.core.index.model.Rules) Before(org.junit.Before)

Example 23 with AnalyzerConfigurationMock

use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.

the class KeyTreeMapMergeTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    treeMap = new KeyTreeMap<>(NAME_KEY_DEFINITION, AGE_KEY_DEFINITION);
    pat = new Person("Pat", 10);
    add(treeMap, pat);
    otherKeyTreeMap = new KeyTreeMap<>(NAME_KEY_DEFINITION, AGE_KEY_DEFINITION);
    mat = new Person("mat", 15);
    add(otherKeyTreeMap, mat);
}
Also used : AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) Before(org.junit.Before)

Example 24 with AnalyzerConfigurationMock

use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.

the class KeyTreeMapTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    map = new KeyTreeMap<>(AGE, NAME);
    toni = new Person("Toni", 20);
    eder = new Person("Eder", 20);
    michael = new Person("Michael", 30);
    put(toni);
    put(eder);
    put(michael);
}
Also used : AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) Before(org.junit.Before)

Example 25 with AnalyzerConfigurationMock

use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.

the class UpdatableInspectorListTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    list = new UpdatableInspectorList<>(new InspectorFactory<HasUUID, Item>(configuration) {

        @Override
        public HasUUID make(final Item item) {
            return new HasUUID() {

                @Override
                public UUIDKey getUuidKey() {
                    return mock(UUIDKey.class);
                }
            };
        }
    }, configuration);
}
Also used : HasUUID(org.drools.verifier.core.maps.util.HasUUID) AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) Before(org.junit.Before)

Aggregations

AnalyzerConfigurationMock (org.drools.verifier.core.AnalyzerConfigurationMock)29 Field (org.drools.verifier.core.index.model.Field)17 ObjectField (org.drools.verifier.core.index.model.ObjectField)17 Test (org.junit.Test)16 Before (org.junit.Before)13 RuleInspector (org.drools.verifier.core.cache.inspectors.RuleInspector)3 Date (java.util.Date)2 ObjectType (org.drools.verifier.core.index.model.ObjectType)2 InspectorList (org.drools.verifier.core.maps.InspectorList)2 HashSet (java.util.HashSet)1 Check (org.drools.verifier.core.checks.base.Check)1 CheckFactory (org.drools.verifier.core.checks.base.CheckFactory)1 CheckStorage (org.drools.verifier.core.checks.base.CheckStorage)1 SingleCheck (org.drools.verifier.core.checks.base.SingleCheck)1 Values (org.drools.verifier.core.index.keys.Values)1 Column (org.drools.verifier.core.index.model.Column)1 Columns (org.drools.verifier.core.index.model.Columns)1 Conditions (org.drools.verifier.core.index.model.Conditions)1 FieldAction (org.drools.verifier.core.index.model.FieldAction)1 ObjectTypes (org.drools.verifier.core.index.model.ObjectTypes)1