use of org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52 in project drools-wb by kiegroup.
the class DecisionTableAnalyzerTest method testInsertNonExistingColumn.
@Test(expected = IllegalArgumentException.class)
public void testInsertNonExistingColumn() throws Exception {
ConditionCol52 a = new ConditionCol52();
ConditionCol52 b = new ConditionCol52();
pattern.setChildColumns(Arrays.asList(a));
BRLConditionColumn brlCondition = new BRLConditionColumn();
BRLConditionVariableColumn c = new BRLConditionVariableColumn();
BRLConditionVariableColumn d = new BRLConditionVariableColumn();
brlCondition.setChildColumns(Arrays.asList(c, d));
model.getConditions().addAll(Arrays.asList(pattern, brlCondition));
decisionTableAnalyzer.insertColumn(b);
}
use of org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52 in project drools-wb by kiegroup.
the class DecisionTableAnalyzerTest method testInsertBRLVariableColumn.
@Test
public void testInsertBRLVariableColumn() throws Exception {
ConditionCol52 a = new ConditionCol52();
ConditionCol52 b = new ConditionCol52();
pattern.setChildColumns(Arrays.asList(a, b));
BRLConditionColumn brlCondition = new BRLConditionColumn();
BRLConditionVariableColumn c = new BRLConditionVariableColumn();
BRLConditionVariableColumn d = new BRLConditionVariableColumn();
brlCondition.setChildColumns(Arrays.asList(c, d));
model.getConditions().addAll(Arrays.asList(pattern, brlCondition));
decisionTableAnalyzer.insertColumn(d);
verify(updateManager).newColumn(model, 5);
}
use of org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52 in project drools-wb by kiegroup.
the class ValidatorTest method testIsConditionValidWhenHeaderIsNotUnique.
@Test
public void testIsConditionValidWhenHeaderIsNotUnique() throws Exception {
final ConditionCol52 conditionCol1 = fakeConditionCol52("header");
final ConditionCol52 conditionCol2 = fakeConditionCol52("header");
final Validator validator = new Validator(fakeCompositeColumn(conditionCol1, conditionCol2));
assertFalse(validator.isConditionValid(conditionCol2));
}
use of org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52 in project drools-wb by kiegroup.
the class ValidatorTest method testIsConditionValidWhenHeaderIsValid.
@Test
public void testIsConditionValidWhenHeaderIsValid() throws Exception {
final ConditionCol52 conditionCol1 = fakeConditionCol52("header1");
final ConditionCol52 conditionCol2 = fakeConditionCol52("header2");
final Validator validator = new Validator(fakeCompositeColumn(conditionCol1, conditionCol2));
assertTrue(validator.isConditionValid(conditionCol2));
}
use of org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52 in project drools-wb by kiegroup.
the class ValidatorTest method testIsConditionHeaderNotBlankWhenHeaderIsValid.
@Test
public void testIsConditionHeaderNotBlankWhenHeaderIsValid() throws Exception {
final Validator validator = new Validator();
final ConditionCol52 col52 = fakeConditionCol52("my header");
assertTrue(validator.isConditionHeaderNotBlank(col52));
}
Aggregations