This works (http://junit.sourceforge.net/doc/faq/faq.htm#organize_3),
thank you.
But it doesn't work exactly like I originally wanted it.
I wrote a TestCase (lets call it CompanyTestCase) which I extend from
the original JUnit TestCase class.
I would like that the subclasses of CompanyTestCase only need to
override the methods oneTimeSetUp() and oneTimeTearDown().
But I didn't figure it out how to do it since its a mix of static and
non static things.
The other code should be in the upper class, CompanyTestCase, instead
of pasting it in all subclasses:
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(SomeTest.suite());
suite.addTest(AnotherTest.suite());
TestSetup wrapper = new TestSetup(suite) {
protected void setUp() {
oneTimeSetUp();
}
protected void tearDown() {
oneTimeTearDown();
}
};
return wrapper;
}
Is there a solution for what I want to achieve?
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/junit/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
