added test and behaviour for calling a java method with incorrect number of arguments

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@95 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Andy Clement
2008-08-18 22:43:17 +00:00
parent 2d4e2685e9
commit 5cdeaa9644
2 changed files with 9 additions and 3 deletions
@@ -33,6 +33,7 @@ public class VariableAndFunctionTests extends ExpressionTestCase {
public void testFunctionAccess01() {
evaluate("#reverseInt(1,2,3)", "int[3]{3,2,1}", int[].class);
evaluate("#reverseInt('1',2,3)", "int[3]{3,2,1}", int[].class); // requires type conversion of '1' to 1
evaluateAndCheckError("#reverseInt(1)", SpelMessages.INCORRECT_NUMBER_OF_ARGUMENTS_TO_FUNCTION, 1, 1, 3);
}
public void testFunctionAccess02() {