Andrea Aime a écrit :
> The problem is, whatever method is marked as one time setup
> using @BeforeClass has to be static, so the above framework
> cannot work.
I have the feeling that it is on intend in order to make sure that the
@BeforeClass method writes only in static fields. Given that JUnit creates a
new
instance of the test class for every test methods (last time I checked - maybe
TestNG does not), then if we want to have non-static fields initialized we
would
need to run the initialization method before every tests, which is exactly what
we wish to avoid with @BeforeClass...
> Glub... any better idea?
I have not looked to the test so I may be telling a inaplicable proposal... But
is there anything preventing to have a @BeforeClass method initializing some
static fields, and a @Before method copying the values from the static fields
to
non-static fields?
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel