Slim doesn't support variable arguments. The best you can do is write wrapper methods with fixed arguments.
public void testOneArg(Object arg1) { testArgs(arg1); }
public void testTwoArgs(Object arg1, Object arg2) { testArgs(arg1, arg2); }
Frage
Right now I am running the java version of FitNesse 20130530. I would like to have a method in my fixture that have variable arguments, like:
public class VarArgTester {
public void testVarargs(Object... newData) {
[...]
}
}
and to call it like
!define TEST_SYSTEM {slim}
!|import|
|VarArgTester|
!|script|VarArgTester|
|test varargs;|9999|fitnesse|01-Jan-1970|
Right now I get following error message:
Method testVarargs[3] not found in package.name.VarArgTester.
So, it seems like this functionality is not implemented. But if so, how do I use it?
Lösung
Slim doesn't support variable arguments. The best you can do is write wrapper methods with fixed arguments.
public void testOneArg(Object arg1) { testArgs(arg1); }
public void testTwoArgs(Object arg1, Object arg2) { testArgs(arg1, arg2); }