|
From: SourceForge.net <no...@so...> - 2009-10-16 10:35:21
|
Bugs item #2880395, was opened at 2009-10-16 10:33 Message generated for change (Settings changed) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115278&aid=2880395&group_id=15278 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: framework Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jensen () Assigned to: Nobody/Anonymous (nobody) >Summary: ExpectedException.expectMessage ignored if empty parameter Initial Comment: The method ExpectedException.expectMessage in JUnit 4.7 does not work as expected if an empty string is passed. @Rule ExpectedException thrown = ExpectedException.none(); @Test //that should have failed public void test() { thrown.expect(RuntimeException.class); thrown.expectMessage(""); throw new RuntimeException("some text"); } @Test //that actually fails public void test() { thrown.expect(RuntimeException.class); thrown.expectMessage("bad text"); throw new RuntimeException("some text"); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115278&aid=2880395&group_id=15278 |