use of org.drools.workbench.services.verifier.webworker.client.testutil.LimitedGuidedDecisionTableBuilder in project drools-wb by kiegroup.
the class DecisionTableAnalyzerTest method testRedundancy.
@Test
public void testRedundancy() throws Exception {
table52 = new LimitedGuidedDecisionTableBuilder("org.test", new ArrayList<Import>(), "mytable").withIntegerColumn("a", "Person", "age", "==", 0).withAction("a", "Person", "approved", new DTCellValue52() {
{
setBooleanValue(true);
}
}).withAction("a", "Person", "approved", new DTCellValue52() {
{
setBooleanValue(true);
}
}).withData(new Object[][] { { 1, "description", true, true, false }, { 2, "description", true, false, true } }).buildTable();
fireUpAnalyzer();
assertContains(analyzerProvider.getAnalysisReport(), REDUNDANT_ROWS, Severity.WARNING, 1, 2);
assertNotNull(analyzerProvider.getStatus());
}
use of org.drools.workbench.services.verifier.webworker.client.testutil.LimitedGuidedDecisionTableBuilder in project drools-wb by kiegroup.
the class DecisionTableAnalyzerConflictResolverLimitedDTableTest method testConflict.
@Test
public void testConflict() throws Exception {
table52 = new LimitedGuidedDecisionTableBuilder("org.test", new ArrayList<Import>(), "mytable").withIntegerColumn("a", "Person", "age", "==", 0).withAction("a", "approved", DataType.TYPE_BOOLEAN, new DTCellValue52() {
{
setBooleanValue(true);
}
}).withAction("a", "approved", DataType.TYPE_BOOLEAN, new DTCellValue52() {
{
setBooleanValue(false);
}
}).withData(new Object[][] { { 1, "description", true, true, false }, { 2, "description", true, false, true } }).buildTable();
fireUpAnalyzer();
assertContains(analyzerProvider.getAnalysisReport(), CONFLICTING_ROWS, Severity.WARNING, 2);
assertContains(analyzerProvider.getAnalysisReport(), CONFLICTING_ROWS, Severity.WARNING, 1);
}
Aggregations