jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <cml...@gmx.de>
Subject Re: extend a test
Date Thu, 27 Nov 2003 17:05:02 GMT
Stefan Groschupf wrote:
> Hi there,
> 
> ARRGGHH this problem steal me more then 5 hours and I havent still a 
> solution. ;-(
> Some work around's but I'm not really happy with it.
> 
> I wish to implement a class that contains some standard methods I need 
> to test my application, e.g database rester, dummy data creator etc..
> I have a j2ee app with stuts ui.
> 
> So I wish to create child of *CactusStrutsTestCase* called MyHelpTestCase.
> So far no problem! But If i wish to extends MyHelpTestCase i got a 
> Exception.
> 
>  [junit] Exception in constructor: testSubscribeDocumentNotification 
> (junit.framework.AssertionFailedError: You are overriding the setUp() 
> method without calling super.setUp().  You must call the superclass 
> setUp() method in your TestCase subclass to ensure proper initialization.
>       [junit]     at 
> servletunit.struts.CactusStrutsTestCase.init(CactusStrutsTestCase.java:75)
> 
> Of cource I have in my contructor a super.setup() call but this does not 
> help.

Okay, if this isn't a type here might be your problem. You absolutely *must* 
call super.setUp() from your overridden setUp() method, calling it from the 
constructor makes no sense and probably confuses StrutsTestCase.

-chris



Mime
View raw message