}
public void testLowerThanExpression() throws ExpressionEvaluationException {
log.debug("Testing LowerThanExpression");
try {
new LowerThanExpression(null, null).evaluate(this.resolver);
fail("LowerThanExpression operands can not be nulls");
} catch (Exception e) {
// normal
}
try {
new LowerThanExpression(this.low, null).evaluate(this.resolver);
fail("LowerThanExpression operands can not be nulls");
} catch (Exception e) {
// normal
}
try {
new LowerThanExpression(null, this.low).evaluate(this.resolver);
fail("LowerThanExpression operands can not be nulls");
} catch (Exception e) {
// normal
}
// evaluating
assertEquals("LowerThanExpression must return true", Boolean.TRUE,
new LowerThanExpression(this.low, this.high)
.evaluate(this.resolver));
assertEquals("LowerThanExpression must return false", Boolean.FALSE,
new LowerThanExpression(this.high, this.low)
.evaluate(this.resolver));
assertEquals("LowerThanExpression must return false", Boolean.FALSE,
new LowerThanExpression(this.high, this.high)
.evaluate(this.resolver));
}