diff --git a/src/main/java/org/junit/Assert.java b/src/main/java/org/junit/Assert.java index 80ba8a8f6e9aa..a3d7905e6d243 100644 --- a/src/main/java/org/junit/Assert.java +++ b/src/main/java/org/junit/Assert.java @@ -1031,6 +1031,6 @@ public static T assertThrows(String message, Class expe } private static String buildPrefix(String message) { - return message != null && message.length() != 0 ? message + " ==> " : ""; + return message != null && message.length() != 0 ? message + ": " : ""; } } diff --git a/src/test/java/org/junit/tests/assertion/AssertionTest.java b/src/test/java/org/junit/tests/assertion/AssertionTest.java index edb781f2dbd0b..d0c3bdfddc59f 100644 --- a/src/test/java/org/junit/tests/assertion/AssertionTest.java +++ b/src/test/java/org/junit/tests/assertion/AssertionTest.java @@ -869,7 +869,7 @@ public void assertThrowsIncludesTheSpecifiedMessage() { assertThrows("Foobar", Throwable.class, nonThrowingRunnable()); } catch (AssertionError ex) { assertEquals( - "Foobar ==> expected java.lang.Throwable to be thrown, but nothing was thrown", + "Foobar: expected java.lang.Throwable to be thrown, but nothing was thrown", ex.getMessage()); return; } @@ -928,7 +928,7 @@ public void assertThrowsSuppliesTheSpecifiedMessageUponTypeMismatch() { try { assertThrows("Foobar", IOException.class, throwingRunnable(npe)); } catch (AssertionError error) { - assertEquals("Foobar ==> unexpected exception type thrown; expected: but was:", + assertEquals("Foobar: unexpected exception type thrown; expected: but was:", error.getMessage()); assertSame(npe, error.getCause()); return;