Re: ExpectedException: expecting a cause's message

Colin Vipurs <[email protected]> Tue, 30 Jul 2013 11:37:01 +0300
Newsgroups gmane.comp.java.junit.user
Message-ID <CAKi4272+6eW_HES3KkdhQwQzeOSdAFXqMnpVcRuVgXGS_hrGCg@mail.gmail.com>
What are you trying to achieve by testing the message of an exception?

When I've done this in the past I've invariably been trying to test the
wrong thing


On Tue, Jul 30, 2013 at 1:44 AM, mikecodeawesome <[email protected]> wrote:

> **
>
>
> Using ExpectedException, how would one go about expecting a cause's
> message? I can't figure out a way of doing this.
>
> Assuming I'm not missing an obvious solution, I'm thinking about
> contributing something like ExpectedException.expectCauseMessage().
>
> Thought I'd post before I do so.
>
>  
>



-- 
Maybe she awoke to see the roommate's boyfriend swinging from the
chandelier wearing a boar's head.

Something which you, I, and everyone else would call "Tuesday", of course.


[Non-text portions of this message have been removed]