@Test
public void testForIntApproximatelyEqualsWithRelativeTolerance() {
TechnicalProperty property = createPropertyWithTypeInteger();
Constraint constraint = createConstraint(property, "1");
constraint.setOperator(BaseConditionOperators.EQUALS);
assignedConstraintsSet.getAssignedConstraints().add(constraint);
BaseCondition baseCondition = createBaseCondition(property,
BaseConditionOperators.APPROXIMATELY_EQUALS, "100");
baseCondition.setTolerance("0.01");
baseCondition.setToleranceType(ToleranceTypes.RELATIVE);
precondition.setLogicalConnectiveType(LogicalConnectiveTypes.AND);
precondition.getBaseConditions().add(baseCondition);
// test for true
constraint.setValue("100");
assertLogicalTrue();
constraint.setValue("101");
assertLogicalTrue();
constraint.setValue("99");
assertLogicalTrue();
// test for false
constraint.setValue("102");
assertLogicalFalse();
constraint.setValue("98");
assertLogicalFalse();
}