use of org.drools.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class DecisionTableAnalyzerFromFileTest method testFileBaseEntitlementGDST.
@Test
public void testFileBaseEntitlementGDST() throws Exception {
final String xml = loadResource("Base entitlement.gdst");
final Analyzer analyzer = analyzerProvider.makeAnalyser(GuidedDTXMLPersistence.getInstance().unmarshal(xml));
analyzer.resetChecks();
analyzer.analyze();
assertTrue(analyzerProvider.getAnalysisReport().isEmpty());
}
use of org.drools.verifier.core.main.Analyzer 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.core.main.Analyzer in project drools-wb by kiegroup.
the class DecisionTableAnalyzerFromFileTest method testFileLargeFileGDST.
@Test
public void testFileLargeFileGDST() throws Exception {
final String xml = loadResource("Large file.gdst");
final Analyzer analyzer = analyzerProvider.makeAnalyser(GuidedDTXMLPersistence.getInstance().unmarshal(xml));
analyzer.resetChecks();
analyzer.analyze();
assertOnlyContains(analyzerProvider.getAnalysisReport(), CheckType.SINGLE_HIT_LOST, CheckType.EMPTY_RULE);
}
use of org.drools.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class AnalyzerUpdateTestBase method analyze.
protected void analyze(String resourceName) throws Exception {
final String xml = TestUtil.loadResource(resourceName);
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
// First run
analyzer.resetChecks();
analyzer.analyze();
}
use of org.drools.verifier.core.main.Analyzer in project drools-wb by kiegroup.
the class DatesFromFileTest method testComplete.
@Test
public void testComplete() throws Exception {
final String xml = loadResource("Dates-complete.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
assertDoesNotContain(CheckType.MISSING_RANGE, analyzerProvider.getAnalysisReport());
}
Aggregations