final List functions = pkg.getFunctions();
assertEquals( 2,
functions.size() );
FunctionDescr func = (FunctionDescr) functions.get( 0 );
assertEquals( "functionA",
func.getName() );
assertEquals( "String",
func.getReturnType() );
assertEquals( 2,
func.getParameterNames().size() );
assertEquals( 2,
func.getParameterTypes().size() );
assertEquals( 4,
func.getLine() );
assertEquals( 0,
func.getColumn() );
assertEquals( "String",
func.getParameterTypes().get( 0 ) );
assertEquals( "s",
func.getParameterNames().get( 0 ) );
assertEquals( "Integer",
func.getParameterTypes().get( 1 ) );
assertEquals( "i",
func.getParameterNames().get( 1 ) );
assertEqualsIgnoreWhitespace( "foo();",
func.getBody() );
func = (FunctionDescr) functions.get( 1 );
assertEquals( "functionB",
func.getName() );
assertEqualsIgnoreWhitespace( "bar();",
func.getText() );
}