I want to pass an object (not just a string or integer) from a TestSuite to all the TestCases.
In previous junit versions I could have pass an argument to the constructor before calling testSuite.addTest(new TestCase(someObject))
How can I do it now using the annotation style?
Thanks
I want to pass an object (not just a string or integer) from a
Share
I would make that a singleton with lazy loading. The first test calls TomcatHelper.getSharedTomcat() which creates the shared state. The second tests calls TomcatHelper.getSharedTomcat() which returns the same instances before.
I don’t think your example is extreme enough to be worth mucking with runners/hacking JUnit to do something non-traditional.