Craig,
Correct the AbstractJsfTestCase .java has never thrown Exception from
the setup and tearDown methods. But JUnit's TestCase, which is the
super class does throw Exceptions from these methods. The
AbstractJsfTestCase is altering the original method signature and
restricting the ability to throw exceptions.
Junit Source snippett from junit.framework.TestCase.java
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*/
protected void setUp() throws Exception {
}
/**
* Tears down the fixture, for example, close a network
connection.
* This method is called after a test is executed.
*/
protected void tearDown() throws Exception {
}
I'm extending your setup method and the methods that I'm invoking throw
exceptions....which I can not do at the moment due to the current
difference in method signatures.
Thanks
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Thursday, August 10, 2006 12:03 PM
To: [email protected]
Subject: Re: FW: Shale Test - Exceptions
On 8/10/06, Butash, Bob <[EMAIL PROTECTED]> wrote:
>
> Reposting to the User list...
>
> Thanks
Bob,
I"ve been doing a bit of archeology on AbstractJsfBaseClass.java. As
far as I can tell, the setUp() and tearDown() methods in this class have
*never* said "throws Exception" on their signatures (although I wish
they had :-).
Do you have a version where this was different?
I'm pretty nervous about changing this signature right now, because it
would break every existing test case that extends this class, but does
not already have the "throws Exception" in their signature.
Craig
-----Original Message-----
> From: Butash, Bob [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 08, 2006 12:27 PM
> To: [email protected]
> Subject: Shale Test - Exceptions
>
> Looking at Shale Test, specifically the AbstractJsfTestCase I noticed
> that the method signatures of the JUnit setup & tearDown methods have
> been altered so that they no longer can throw exceptions.
>
> Just wondering if the "throws Exception" can be added back to these
> methods so they stay true to JUnit.
>
> Thanks,
>
> Bob Butash
>
>
>
>