use of org.geotools.filter.FunctionExpression in project sldeditor by robward-scisys.
the class FunctionManagerTest method testCreateExpression.
/**
* Test method for
* {@link com.sldeditor.filter.v2.function.FunctionManager#createExpression(org.opengis.filter.capability.FunctionName)}.
*/
@Test
public void testCreateExpression() {
DefaultFunctionFactory functionFactory = new DefaultFunctionFactory();
List<FunctionName> functionNameList = functionFactory.getFunctionNames();
FunctionName functionName = null;
Expression expression = FunctionManager.getInstance().createExpression(functionName);
assertNull(expression);
functionName = functionNameList.get(0);
expression = FunctionManager.getInstance().createExpression(functionName);
assertNotNull(expression);
FunctionExpression funcExpression = (FunctionExpression) expression;
assertTrue(functionName.getName().compareTo(funcExpression.getName()) == 0);
}
Aggregations