use of com.sldeditor.filter.v2.function.misc.IsLike.IsLikeExtended in project sldeditor by robward-scisys.
the class MiscTests method testIsLikeClass.
/**
* {@link com.sldeditor.filter.v2.function.misc.IsLike}.
*/
@Test
public void testIsLikeClass() {
FilterConfigInterface objUnderTest = new IsLike();
assertNotNull(objUnderTest.getFilterConfiguration());
assertNotNull(objUnderTest.createFilter());
assertNull(objUnderTest.createLogicFilter(null));
IsLikeExtended filter = (IsLikeExtended) objUnderTest.createFilter(null);
assertNull(filter.getLiteral());
assertNull(filter.getExpression());
List<Expression> parameterList = new ArrayList<Expression>();
try {
parameterList.add(ff.literal(CQL.toFilter("expr1 >= 5")));
} catch (CQLException e) {
e.printStackTrace();
fail();
}
filter = (IsLikeExtended) objUnderTest.createFilter(parameterList);
assertNull(filter.getLiteral());
assertNull(filter.getExpression());
parameterList.add(ff.literal("expr2"));
parameterList.add(ff.literal("expr3"));
parameterList.add(ff.literal("expr4"));
parameterList.add(ff.literal("expr5"));
parameterList.add(ff.literal(true));
filter = (IsLikeExtended) objUnderTest.createFilter(parameterList);
assertNotNull(filter.getLiteral());
assertNotNull(filter.getExpression());
System.out.println(filter.toString());
}
Aggregations