@Test
public void testImpossibleMatchesString() throws ParseException {
SuggestionCompletionEngine sce = buildSuggestionCompletionEngine();
GuidedDecisionTable52 dt = new GuidedDecisionTable52();
Pattern52 driverPattern = new Pattern52();
driverPattern.setBoundName("driverPattern");
driverPattern.setFactType("Driver");
ConditionCol52 name = new ConditionCol52();
name.setFactField("name");
name.setOperator("==");
name.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
driverPattern.getChildColumns().add(name);
ConditionCol52 notName = new ConditionCol52();
notName.setFactField("name");
notName.setOperator("!=");
notName.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
driverPattern.getChildColumns().add(notName);
ConditionCol52 nameIn = new ConditionCol52();
nameIn.setFactField("name");
nameIn.setOperator("in");
nameIn.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
driverPattern.getChildColumns().add(nameIn);
dt.getConditions().add(driverPattern);
ActionSetFieldCol52 message = new ActionSetFieldCol52();
message.setBoundName("m");
message.setFactField("message");
dt.getActionCols().add(message);
@SuppressWarnings("unchecked")
List<List<DTCellValue52>> data = Arrays.asList(
Arrays.asList(
new DTCellValue52(1),
new DTCellValue52("Row 1 description"),
new DTCellValue52("Homer"),
new DTCellValue52("Bart"),
new DTCellValue52((String) null),
new DTCellValue52("Row 1 message")
),
Arrays.asList(
new DTCellValue52(2),
new DTCellValue52("Row 2 description"),
new DTCellValue52("Homer"),
new DTCellValue52("Homer"),
new DTCellValue52((String) null),
new DTCellValue52("Row 2 message")
),
Arrays.asList(
new DTCellValue52(3),
new DTCellValue52("Row 3 description"),
new DTCellValue52("Homer"),
new DTCellValue52((String) null),
new DTCellValue52((String) null),
new DTCellValue52("Row 3 message")
),
Arrays.asList(
new DTCellValue52(4),
new DTCellValue52("Row 4 description"),
new DTCellValue52((String) null),
new DTCellValue52("Bart"),
new DTCellValue52((String) null),
new DTCellValue52("Row 4 message")
),
Arrays.asList(
new DTCellValue52(5),
new DTCellValue52("Row 5 description"),
new DTCellValue52("Homer"),
new DTCellValue52((String) null),
new DTCellValue52("Marge,Lisa"),
new DTCellValue52("Row 5 message")
)
);
dt.setData(data);
DecisionTableAnalyzer analyzer = new DecisionTableAnalyzer(sce);
List<Analysis> analysisData = analyzer.analyze(dt);
assertEquals(data.size(), analysisData.size());