use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb 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()), DataType.DataTypes.BOOLEAN, true);
ActionInspector b = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "Boolean", "isOldEnough", new AnalyzerConfigurationMock()), DataType.DataTypes.STRING, "false");
assertTrue(a.conflicts(b));
assertTrue(b.conflicts(a));
}
use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb by kiegroup.
the class ActionInspectorConflictResolverTest method testConflict001.
@Test
public void testConflict001() throws Exception {
ActionInspector a = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "String", "name", new AnalyzerConfigurationMock()), DataType.DataTypes.STRING, "Toni");
ActionInspector b = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "String", "name", new AnalyzerConfigurationMock()), DataType.DataTypes.STRING, "Rambo");
assertTrue(a.conflicts(b));
assertTrue(b.conflicts(a));
}
use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb by kiegroup.
the class ActionInspectorConflictResolverTest method testRedundancy005.
@Test
public void testRedundancy005() throws Exception {
ActionInspector a = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "Boolean", "isOldEnough", new AnalyzerConfigurationMock()), DataType.DataTypes.BOOLEAN, true);
ActionInspector b = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "Boolean", "isOldEnough", new AnalyzerConfigurationMock()), DataType.DataTypes.STRING, "false");
assertFalse(a.isRedundant(b));
assertFalse(b.isRedundant(a));
}
use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb by kiegroup.
the class RuleInspectorCacheTest method setUp.
@Before
public void setUp() throws Exception {
final Index index = new IndexImpl();
final AnalyzerConfiguration configuration = new AnalyzerConfigurationMock();
cache = new RuleInspectorCache(index, configuration);
cache.addRule(new Rule(0, configuration));
cache.addRule(new Rule(1, configuration));
cache.addRule(new Rule(2, configuration));
cache.addRule(new Rule(3, configuration));
cache.addRule(new Rule(4, configuration));
cache.addRule(new Rule(5, configuration));
cache.addRule(new Rule(6, configuration));
}
use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb 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));
}
Aggregations