Search in sources :

Example 26 with AnalyzerConfigurationMock

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

the class KeyTreeMapMultiValueKeyTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    map = new KeyTreeMap<>(NAME, AREA_CODE);
    finland = new Country("Finland", 48100);
    sweden = new Country("Sweden", 12345, 51000);
    norway = new Country("Norway", 00000, 51000);
    map.put(finland);
    map.put(sweden);
    map.put(norway);
}
Also used : AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) Before(org.junit.Before)

Example 27 with AnalyzerConfigurationMock

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

the class RelationResolverSubsumptionTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    a = new InspectorList(configuration);
    b = new InspectorList(configuration);
    a.add(new Person(15));
    firstItemInB = spy(new Person(15));
    b.add(firstItemInB);
    blockingItem = spy(new Person(10));
    b.add(blockingItem);
    relationResolver = new RelationResolver(a, true);
}
Also used : AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) InspectorList(org.drools.verifier.core.maps.InspectorList) Before(org.junit.Before)

Example 28 with AnalyzerConfigurationMock

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

the class FieldInspectorRelationsTest method setUp.

@Before
public void setUp() throws Exception {
    configurationMock = new AnalyzerConfigurationMock();
    ObjectField objectField = mock(ObjectField.class);
    a = new FieldInspector(new Field(objectField, "org.Person", "String", "name", configurationMock), mock(RuleInspectorUpdater.class), mock(AnalyzerConfiguration.class));
    b = new FieldInspector(new Field(objectField, "org.Person", "String", "name", configurationMock), mock(RuleInspectorUpdater.class), mock(AnalyzerConfiguration.class));
}
Also used : Field(org.drools.verifier.core.index.model.Field) ObjectField(org.drools.verifier.core.index.model.ObjectField) AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) ObjectField(org.drools.verifier.core.index.model.ObjectField) Before(org.junit.Before)

Example 29 with AnalyzerConfigurationMock

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

the class CheckFactoryTest method defaultWhiteList.

@Test
public void defaultWhiteList() throws Exception {
    final AnalyzerConfigurationMock configuration = new AnalyzerConfigurationMock(CheckConfiguration.newDefault());
    assertFalse(new CheckFactory(configuration).makeSingleChecks(mock(RuleInspector.class)).isEmpty());
    assertTrue(new CheckFactory(configuration).makePairRowCheck(mock(RuleInspector.class), mock(RuleInspector.class)).isPresent());
}
Also used : AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) RuleInspector(org.drools.verifier.core.cache.inspectors.RuleInspector) Test(org.junit.Test)

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