Package org.araneaframework.backend.list.memorybased.expression.string

Examples of org.araneaframework.backend.list.memorybased.expression.string.ConcatenationExpression


  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));
  }
View Full Code Here

TOP

Related Classes of org.araneaframework.backend.list.memorybased.expression.string.ConcatenationExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.