* @source $URL$
*/
public class FunctionImplTest extends TestCase {
public void testFunctionName() throws Exception {
FunctionName fn = FunctionImpl.functionName("foo", "bar:Integer", "a", "x:String:1,1",
"y:MultiPolygon", "z:java.util.Date:1,");
assertEquals("foo", fn.getName());
check(fn.getReturn(), "bar", Integer.class, 1, 1);
check(fn.getArguments().get(0), "a", Object.class, 1, 1);
check(fn.getArguments().get(1), "x", String.class, 1, 1);
check(fn.getArguments().get(2), "y", MultiPolygon.class, 1, 1);
check(fn.getArguments().get(3), "z", Date.class, 1, -1);
fn = FunctionImpl.functionName("foo", "a", "geom::1,1", "b:Object:,");
check(fn.getArguments().get(0), "geom", Geometry.class, 1, 1);
check(fn.getArguments().get(1), "b", Object.class, -1, -1);
fn = FunctionImpl.functionName("foo", "value", "geom::,");
check(fn.getArguments().get(0), "geom", Geometry.class, -1, -1);
}