use of org.drools.verifier.api.reporting.Issue 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();
assertDoesNotContain(CheckType.CONFLICTING_ROWS, analysisReport);
assertDoesNotContain(CheckType.SINGLE_HIT_LOST, analysisReport);
}
use of org.drools.verifier.api.reporting.Issue in project drools-wb by kiegroup.
the class BRLFragmentsAnalyzerFromFileTest method legalBRLColumns.
/*
https://issues.redhat.com/browse/DROOLS-4945
*/
@Test
public void legalBRLColumns() throws Exception {
final String xml = loadResource("TicketsDT.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
final Set<Issue> analysisReport = analyzerProvider.getAnalysisReport();
assertTrue(analysisReport.isEmpty());
}
use of org.drools.verifier.api.reporting.Issue in project drools-wb by kiegroup.
the class BRLFragmentsAnalyzerFromFileTest method testRuleTableGDSTWorkItem.
@Test
public void testRuleTableGDSTWorkItem() throws Exception {
final String xml = loadResource("WorkItem.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
final Set<Issue> analysisReport = analyzerProvider.getAnalysisReport();
assertTrue(analysisReport.isEmpty());
}
use of org.drools.verifier.api.reporting.Issue in project drools-wb by kiegroup.
the class DecisionTableAnalyzerFromFileTest method emptyValueListOnColumnShouldNotCountAsAnEnum.
@Test
public void emptyValueListOnColumnShouldNotCountAsAnEnum() throws Exception {
analyzerProvider.getFactTypes().add(new FactTypes.FactType("Data", new Sets.Builder<FactTypes.Field>().add(new FactTypes.Field("totalAmount", DataType.TYPE_NUMERIC_FLOAT)).build()));
final String xml = loadResource("DROOLS-5059.gdst");
final Analyzer analyzer = analyzerProvider.makeAnalyser(GuidedDTXMLPersistence.getInstance().unmarshal(xml));
analyzer.resetChecks();
analyzer.analyze();
Set<Issue> analysisReport = analyzerProvider.getAnalysisReport();
assertOnlyContains(analysisReport, CheckType.MISSING_RANGE);
}
use of org.drools.verifier.api.reporting.Issue in project drools-wb by kiegroup.
the class DecisionTableAnalyzerAllowListTest method noRedundantRows.
@Test
public void noRedundantRows() throws Exception {
final AnalyzerConfigurationMock analyzerConfiguration = new AnalyzerConfigurationMock();
analyzerConfiguration.getCheckConfiguration().getCheckConfiguration().remove(CheckType.REDUNDANT_ROWS);
analyzerConfiguration.getCheckConfiguration().getCheckConfiguration().remove(CheckType.SUBSUMPTANT_ROWS);
analyzerProvider.setConfiguration(analyzerConfiguration);
fireUpAnalyzer();
final Set<Issue> analysisReport = analyzerProvider.getAnalysisReport();
assertOnlyContains(analysisReport, CheckType.SINGLE_HIT_LOST, CheckType.EMPTY_RULE);
}
Aggregations