/** * Create a new Parameter with all of the values of the given Parameter except for it's Type * * @param param A Parameter * @param type The new Class type * @return A new Parameter */ private Parameter changeParamType(Parameter param, Class type) { return new Parameter( param.getName(), type, param.getTitle(), param.getDescription(), param.isRequired(), param.getMinOccurs(), param.getMaxOccurs(), param.getDefaultValue(), null); } }
assertTrue("geom in inputs", inputs.containsKey("geom")); Parameter<?> geomParam = inputs.get("geom"); assertEquals("geom title", "Input Geometry", geomParam.getTitle().toString()); assertEquals( "geom description", "The target geometry.", geomParam.getDescription().toString()); assertEquals("distance title", "Buffer Distance", distance.getTitle().toString()); assertEquals( "distance description",
assertEquals("first title", "First Operand", first.getTitle().toString()); assertEquals("first description", "The first operand.", first.getDescription().toString()); assertEquals("first type", Float.class, first.getType()); assertEquals("second title", "Second Operand", second.getTitle().toString()); assertEquals( "second description", "The second operand.", second.getDescription().toString()); assertEquals("sum title", "Sum", sumParam.getTitle().toString()); assertEquals( "sum description",