Search in sources :

Example 1 with Function

use of org.opengis.filter.expression.Function in project ddf by codice.

the class GeoToolsFunctionFactoryTest method testFuzzyFunction.

@Test
public void testFuzzyFunction() {
    List<Expression> expr = new ArrayList<>();
    expr.add(Expression.NIL);
    Function result = toTest.function(FuzzyFunction.NAME.getName(), expr, null);
    assertThat(result.getName(), is(FuzzyFunction.NAME.getName()));
}
Also used : Function(org.opengis.filter.expression.Function) Expression(org.opengis.filter.expression.Expression) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 2 with Function

use of org.opengis.filter.expression.Function in project ddf by codice.

the class GeoToolsFunctionFactoryTest method testFunctionForValidNameWithTooManyExpressions.

@Test(expected = IllegalArgumentException.class)
public void testFunctionForValidNameWithTooManyExpressions() {
    List<Expression> expr = new ArrayList<>();
    expr.add(Expression.NIL);
    expr.add(Expression.NIL);
    Function result = toTest.function(FuzzyFunction.NAME.getName(), expr, null);
    assertThat(result.getName(), is(FuzzyFunction.NAME.getName()));
}
Also used : Function(org.opengis.filter.expression.Function) Expression(org.opengis.filter.expression.Expression) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 3 with Function

use of org.opengis.filter.expression.Function in project ddf by codice.

the class GeoToolsFunctionFactoryTest method testProximityFunction.

@Test
public void testProximityFunction() {
    List<Expression> expr = new ArrayList<>();
    expr.add(Expression.NIL);
    expr.add(Expression.NIL);
    expr.add(Expression.NIL);
    Function result = toTest.function(ProximityFunction.NAME.getName(), expr, null);
    assertThat(result.getName(), is(ProximityFunction.NAME.getName()));
}
Also used : Function(org.opengis.filter.expression.Function) Expression(org.opengis.filter.expression.Expression) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)3 Test (org.junit.Test)3 Expression (org.opengis.filter.expression.Expression)3 Function (org.opengis.filter.expression.Function)3