hi there! I have a question to the author: does your book cover how to correctly
test methods that throw exceptions?
I've testing methods that throw exceptions like this:
- at first, I simply write a testXXX() throws Exception{}
- then, I write code that
should throw an exception, an I catch it. But the testXXX() still throws exceptions, so I can test that my method really is throwing the
right exception.
Is this procedure ok, or is there any other ideias in the book? Thanks for any reply!
I think exceptions are a very important issue, and something not that easy to test sometimes.
[ November 06, 2003: Message edited by: bengt hammarlund ]