use of com.sldeditor.filter.v2.function.FilterNameParameter in project sldeditor by robward-scisys.
the class FilterNameTest method testGetFilterName.
/**
* Test method for {@link
* com.sldeditor.filter.v2.function.FilterName#FilterName(java.lang.String, java.lang.Class)}.
* Test method for {@link com.sldeditor.filter.v2.function.FilterName#getFilterName()}. Test
* method for {@link com.sldeditor.filter.v2.function.FilterName#getReturnType()}. Test method
* for {@link com.sldeditor.filter.v2.function.FilterName#getParameterList()}. Test method for
* {@link com.sldeditor.filter.v2.function.FilterName#getParameter(int)}. Test method for {@link
* com.sldeditor.filter.v2.function.FilterName#addParameter(com.sldeditor.filter.v2.function.FilterNameParameter)}.
*/
@Test
public void testGetFilterName() {
String filterName = "test filter";
Class<?> returnType = String.class;
FilterName f = new FilterName(filterName, returnType);
assertTrue(filterName.compareTo(f.getFilterName()) == 0);
assertEquals(returnType, f.getReturnType());
FilterNameParameter p1 = new FilterNameParameter("parameter 1", ExpressionTypeEnum.LITERAL, Integer.class);
f.addParameter(p1);
assertEquals(1, f.getParameterList().size());
assertEquals(null, f.getParameter(-1));
assertEquals(null, f.getParameter(99));
assertEquals(p1, f.getParameter(0));
}
Aggregations