use of org.drools.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class DecisionTableAnalyzerFromFileTest method testLHSConflictsArePickedUpForEachFieldOfAPatternTheFileFromTicket.
@Test
public void testLHSConflictsArePickedUpForEachFieldOfAPatternTheFileFromTicket() throws Exception {
final String xml = loadResource("GUVNOR-3513-second-version.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
assertResultIsEmpty(analyzerProvider.getAnalysisReport());
}
use of org.drools.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class EffectiveDatesFromFileTest method testUpdateNotNullColumn.
@Test
public void testUpdateNotNullColumn() throws Exception {
// Table contains two redundant rows, but the rows are active at different times.
final String xml = loadResource("EffectiveDates.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
// First run
analyzer.resetChecks();
analyzer.analyze();
Set<Issue> analysisReport = analyzerProvider.getAnalysisReport();
assertTrue(analysisReport.isEmpty());
}
use of org.drools.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class DatesFromFileTest method testHighEdge.
@Test
public void testHighEdge() throws Exception {
final String xml = loadResource("Dates-missing-edge-high.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
assertContains(analyzerProvider.getAnalysisReport(), CheckType.MISSING_RANGE, Severity.NOTE, 1, 2, 3);
}
use of org.drools.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class DatesFromFileTest method testGap.
@Test
public void testGap() throws Exception {
final String xml = loadResource("Dates-mid-gap.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
Set<Issue> analysisReport = analyzerProvider.getAnalysisReport();
assertContains(analysisReport, CheckType.MISSING_RANGE, Severity.NOTE, 1, 2);
}
use of org.drools.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class DatesFromFileTest method testLowEdge.
@Test
public void testLowEdge() throws Exception {
final String xml = loadResource("Dates-missing-edge-low.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
assertContains(analyzerProvider.getAnalysisReport(), CheckType.MISSING_RANGE, Severity.NOTE, 1, 2, 3);
}
Aggregations