use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb 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.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb 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());
}
use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb 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());
}
use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb by kiegroup.
the class ActionInspectorConflictResolverTest method testRedundancy006.
@Test
public void testRedundancy006() throws Exception {
ActionInspector a = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "Integer", "age", new AnalyzerConfigurationMock()), DataType.DataTypes.NUMERIC_INTEGER, 20);
ActionInspector b = createSetActionInspector(new Field(mock(ObjectField.class), "Person", "Integer", "age", new AnalyzerConfigurationMock()), DataType.DataTypes.STRING, "20");
assertTrue(a.isRedundant(b));
assertTrue(b.isRedundant(a));
}
use of org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock in project drools-wb by kiegroup.
the class ActionInspectorConflictResolverTest method testRedundancy001.
@Test
public void testRedundancy001() 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, "Toni");
assertTrue(a.isRedundant(b));
assertTrue(b.isRedundant(a));
}
Aggregations