parameterized exam box classes junit 3.x
i have junit 3.x testcase i means parameterize. i'd parametrize whole testcase (including fixture). however, testsuite.addtestsuite() slight does grant pass testcase object, only class:
testsuite unit = new testsuite("suite");
suite.addtestsuite(mytestcase.class);
i means pass parameter (a string) mytestcase instance combined exam runs. now, i have have removed category any parameter value.
i attempted flitting an anynomous subclass:
mytestcase testcase = new mytestcase() {
twine getoption() {
relapse "some value";
}
}
suite.addtestsuite(testcase.getclass());
however, fails assertion:
... mytestsuite$1 open constructor testcase(string name) testcase()`
any ideas? am i aggressive problem wrong way?
Comments
Post a Comment