use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.
the class ActionInspectorConflictResolverTest method testRedundancy002.
@Test
public void testRedundancy002() throws Exception {
ActionInspector a = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "String", "name", new AnalyzerConfigurationMock()), "Toni");
ActionInspector b = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "String", "name", new AnalyzerConfigurationMock()), "Rambo");
assertFalse(a.isRedundant(b));
assertFalse(b.isRedundant(a));
}
use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.
the class ActionInspectorConflictResolverTest method testConflict002.
@Test
public void testConflict002() throws Exception {
ActionInspector a = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "Boolean", "isOldEnough", new AnalyzerConfigurationMock()), true);
ActionInspector b = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "Boolean", "isOldEnough", new AnalyzerConfigurationMock()), "false");
assertTrue(a.conflicts(b));
assertTrue(b.conflicts(a));
}
use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.
the class PatternInspectorTest method setUp.
@Before
public void setUp() throws Exception {
configurationMock = new AnalyzerConfigurationMock();
a = new PatternInspector(new Pattern("a", new ObjectType("org.Person", configurationMock), configurationMock), mock(RuleInspectorUpdater.class), mock(AnalyzerConfiguration.class));
b = new PatternInspector(new Pattern("b", new ObjectType("org.Person", configurationMock), configurationMock), mock(RuleInspectorUpdater.class), mock(AnalyzerConfiguration.class));
}
use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.
the class RelationResolverConflictsTest method setUp.
@Before
public void setUp() throws Exception {
configuration = new AnalyzerConfigurationMock();
a = new InspectorList(configuration);
b = new InspectorList(configuration);
firstItemInA = spy(new Person(10));
isConflicting = spy(new Person(15));
a.add(firstItemInA);
a.add(isConflicting);
b.add(new Person(10));
relationResolver = new RelationResolver(a, true);
}
use of org.drools.verifier.core.AnalyzerConfigurationMock in project drools by kiegroup.
the class FieldInspectorUpdateTest method setUp.
@Before
public void setUp() throws Exception {
configurationMock = new AnalyzerConfigurationMock();
final Field field = spy(new Field(objectField, "org.Person", "String", "name", configurationMock));
fieldCondition = makeCondition(field);
fieldAction = makeAction(field);
new FieldInspector(field, ruleInspectorUpdater, new AnalyzerConfigurationMock());
}
Aggregations