Why is @BeforeClass static
Bernard Łabno <[email protected]> Wed, 30 Jul 2008 09:02:08 +0200
| Newsgroups | gmane.comp.java.junit.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm using Seam and want to run tests using it's SeamTest class, but it is meant for TestNG.
I want to extend it and annotate some methods that will call appropriate super methods. However Junit4 requires method annotated with @BeforeClass to be public static and SeamTest.init methods is protected non-static.
Are there any serious reasons to keep @BeforeClass methods static ?
If so what would you propose to do in my situation ? That init method takes quite long to start and I don't know if it is wise to put it into constructor.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/