@Test public void stringTransformFunctionTest() throws Exception { Function f = (Function) ECQL.toExpression("StringTransform('SoMeString', 'uppercase')"); assertEquals("SOMESTRING", f.evaluate(null, String.class)); f = (Function) ECQL.toExpression("StringTransform('SoMeString', 'UPPERCASE')"); assertEquals("SOMESTRING", f.evaluate(null, String.class)); f = (Function) ECQL.toExpression("StringTransform('SoMeString', 'lowercase')"); assertEquals("somestring", f.evaluate(null, String.class)); f = (Function) ECQL.toExpression("StringTransform('SoMeString', 'LOWERCASE')"); assertEquals("somestring", f.evaluate(null, String.class)); f = (Function) ECQL.toExpression("StringTransform('SoMeString', 'none')"); assertEquals("SoMeString", f.evaluate(null, String.class)); f = (Function) ECQL.toExpression("StringTransform('SoMeString', 'default')"); assertEquals("SoMeString", f.evaluate(null, String.class)); f = (Function) ECQL.toExpression("StringTransform('SoMeString', '')"); assertEquals("SoMeString", f.evaluate(null, String.class)); f = (Function) ECQL.toExpression("StringTransform('', '')"); assertEquals("", f.evaluate(null, String.class)); f = ff.function("StringTransform", ff.literal("SoMeString"), ff.literal(null)); assertEquals("SoMeString", f.evaluate(null, String.class)); f = ff.function("StringTransform", ff.literal(null), ff.literal(null)); assertTrue(null == f.evaluate(null, String.class)); }
@Override public Function function(String name, List<Expression> args, Literal fallback) { return function(new NameImpl(name), args, fallback); }
MBFunctionFactory implements FunctionFactory { @Override public Function function(String name, List<Expression> args, Literal fallback) { return function(new NameImpl(name), args, fallback); } }
MBFunctionFactory implements FunctionFactory { @Override public Function function(String name, List<Expression> args, Literal fallback) { return function(new NameImpl(name), args, fallback); }  }
MBFunctionFactory implements FunctionFactory { @Override public Function function(String name, List<Expression> args, Literal fallback) { return function(new NameImpl(name), args, fallback); }  @Override List<FunctionName> getFunctionNames(); @Override Function function(String name, List<Expression> args, Literal fallback); @Override Function function(Name name, List<Expression> args, Literal fallback); }
MBFunctionFactory implements FunctionFactory { @Override public Function function(String name, List<Expression> args, Literal fallback) { return function(new NameImpl(name), args, fallback); }  @Override List<FunctionName> getFunctionNames(); @Override Function function(String name, List<Expression> args, Literal fallback); @Override Function function(Name name, List<Expression> args, Literal fallback);  }