Package org.araneaframework.backend.list.sqlexpr.string

Examples of org.araneaframework.backend.list.sqlexpr.string.SqlLowerExpression


  public void testSqlLowerExpression() {
    log.debug("Testing SqlLowerExpression");
    // constructing
    try {
      new SqlLowerExpression(null);
      fail("Constructing of SqlUpperExpression with NULL as SqlExpression argument should fail");
    } catch (Exception e) {
      // normal
    }

    // SQL String
    assertEquals("SqlLowerExpression must return \"LOWER()\"",
        new SqlLowerExpression(new MockSqlStringExpression(""))
            .toSqlString(), "LOWER()");
    assertEquals("SqlLowerExpression must return \"LOWER(a)\"",
        new SqlLowerExpression(new MockSqlStringExpression("a"))
            .toSqlString(), "LOWER(a)");

    // SQL arguments
    assertTrue("SqlLowerExpression must return an empty array", Arrays
        .equals(new SqlLowerExpression(new MockSqlStringExpression(""))
            .getValues(), new Object[0]));
    assertTrue("SqlLowerExpression must return an empty array", Arrays
        .equals(new SqlLowerExpression(new MockSqlStringExpression(
            new Object[0])).getValues(), new Object[0]));
    assertTrue("SqlLowerExpression must return (\"a\") as values", Arrays
        .equals(new SqlLowerExpression(new MockSqlStringExpression(
            new Object[] { "a" })).getValues(),
            new Object[] { "a" }));
  }
View Full Code Here

TOP

Related Classes of org.araneaframework.backend.list.sqlexpr.string.SqlLowerExpression

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.