@Test
public void testForRegExMatches() {
TechnicalProperty property = createPropertyWithTypeRegularExpression();
Constraint constraint = createConstraint(property, "foo");
constraint.setOperator(BaseConditionOperators.EQUALS);
assignedConstraintsSet.getAssignedConstraints().add(constraint);
BaseCondition baseCondition = createBaseCondition(property,
BaseConditionOperators.MATCHES, "foo");
precondition.setLogicalConnectiveType(LogicalConnectiveTypes.AND);
precondition.getBaseConditions().add(baseCondition);
baseCondition.setValue("(foo|bar)");
// test for true
constraint.setValue("foo");
assertLogicalTrue();
constraint.setValue("bar");
assertLogicalTrue();
// test for false
constraint.setValue("foo bar");
assertLogicalFalse();
}