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

This commit is contained in:
Andy Clement
2008-08-18 22:43:17 +00:00
parent f79e2643a3
commit 23db8b58da
2 changed files with 9 additions and 3 deletions

View File

@@ -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() {