use of org.drools.workbench.services.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class DecisionTableAnalyzerSubsumptionResolverTest method testRedundantConditions001.
@Test
public void testRedundantConditions001() throws Exception {
GuidedDecisionTable52 table52 = new ExtendedGuidedDecisionTableBuilder("org.test", new ArrayList<Import>(), "mytable").withEnumColumn("a", "Person", "name", "==", "Toni,Eder").withConditionIntegerColumn("a", "Person", "name", "==").withData(new Object[][] { { 1, "description", "Toni", "Toni" } }).buildTable();
Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
assertContains(analyzerProvider.getAnalysisReport(), REDUNDANT_CONDITIONS_TITLE, Severity.NOTE);
}
use of org.drools.workbench.services.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class BRLFragmentsAnalyzerFromFileTest method testRuleTableGDST.
@Test
public void testRuleTableGDST() throws Exception {
final String xml = loadResource("RuleTable.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
final Set<Issue> analysisReport = analyzerProvider.getAnalysisReport();
for (final Issue issue : analysisReport) {
System.out.println(issue.getCheckType());
System.out.println(issue.getDebugMessage());
}
assertDoesNotContain(CONFLICTING_ROWS, analysisReport);
assertDoesNotContain(SINGLE_HIT_LOST, analysisReport);
}
Aggregations