Martin Desruisseaux ha scritto:
...

>> 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?

The problem is that the @beforeClass method has to access non static 
methods that will be overridden/defined in subclasses (the main 
geoserver test class is abstract). Basically every subclass can define
its own logging level, fake data directory creation mode, and spring 
context composition... but I cannot do that if the @BeforeClass method 
is static.

I have a solution (see my last mail) but brr.... feels quite like a 
hack. TestNG would provide an elegant way to do what I'm trying to,
but it's not as established as JUnit...

Cheers
Andrea

-------------------------------------------------------------------------
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

Reply via email to