public void testConcatenationExpression()
throws ExpressionEvaluationException {
log.debug("Testing ConcatenationExpression");
try {
new ConcatenationExpression().evaluate(this.resolver);
fail("ConcatenationExpression must throw an exception");
} catch (Exception e) {
// normal
}
try {
new ConcatenationExpression().add(this.part1expr).evaluate(
this.resolver);
} catch (Exception e) {
fail("ConcatenationExpression must pass with one child");
}
assertEquals("ConcatenationExpression must return part1part2",
"part1part2", new ConcatenationExpression().add(this.part1expr)
.add(this.part2expr).evaluate(this.resolver));
assertEquals("ConcatenationExpression must return part2part1",
"part2part1", new ConcatenationExpression().add(this.part2expr)
.add(this.part1expr).evaluate(this.resolver));
assertEquals("ConcatenationExpression must return part1part2part3",
"part1part2part3", new ConcatenationExpression().add(
this.part1expr).add(this.part2expr).add(this.part3expr)
.evaluate(this.resolver));
}