On Fri, Jun 15, 2012 at 11:13 AM, Andrea Aime
<[email protected]>wrote:
> I'm on board with this, but wouldn't this prevent a switch to TestNG or
> Junit 4?
> That is, how does one have a base class that works both for JUnit 3
> and Junit 4/TestNG,
> leaving the existin tests untouched?
>
> Another possibility could be to have our JUnit 3 base class process
> annotations and
> handle them accordingly (ok, not nice, but probably less work)
>
One approach might be to factor out the "mock" geoserver setup to a class
that isn't involved in the test suite hierarchy. The Wicket WicketTester
class is a good example of doing this - you don't inherit from
"BaseWicketTestSupport," you just add a WicketTester field (or even a local
variable.) Similarly, we could have a GeoServerTester that encapsulates the
mock servlet container and client emulation API from the JUnit ones. I
think we could make that migration fairly smooth by having
GeoServerTestSupport just delegate appropriate calls to a GeoServerTester
managed by its setup and teardown methods.
--
David Winslow
OpenGeo - http://opengeo.org/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel