jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SainTiss <saint...@gmx.net>
Subject how to test an exception?
Date Tue, 10 Dec 2002 16:44:53 GMT
Hi,

I thought there'd be an assertXXX method to test that an exception
should be thrown, but I can't find any...

Or is there another "nice" way to test it?

I mean, I can do this:

try{
	// codeThatShouldThrowException
}
catch(exception) {}

fail();

But that doesn't look very pretty to me, does it?

I noticed that there is an ExceptionTestCase in JUnit, but I'm not sure
if this is available in Cactus as well?

Thanks

Hans

Mime
View raw message