Skip to content

Commit aace70a

Browse files
committed
assertion on complete error message
1 parent 6384edf commit aace70a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/junit/tests/experimental/rules/ExpectedExceptionTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import static java.util.Arrays.asList;
44
import static org.hamcrest.CoreMatchers.any;
55
import static org.hamcrest.CoreMatchers.containsString;
6-
import static org.hamcrest.CoreMatchers.endsWith;
76
import static org.hamcrest.CoreMatchers.is;
87
import static org.hamcrest.CoreMatchers.nullValue;
98
import static org.hamcrest.CoreMatchers.startsWith;
@@ -72,8 +71,9 @@ public static Collection<Object[]> testsWithEventMatcher() {
7271
{ViolateAssumptionAndExpectException.class,
7372
hasSingleAssumptionFailure()},
7473
{ThrowExpectedAssertionError.class, everyTestRunSuccessful()},
75-
{DontThrowAssertionErrorButExpectOne.class, hasSingleFailureWithMessage(
76-
endsWith("Expected test to throw an instance of java.lang.AssertionError"))},
74+
{
75+
DontThrowAssertionErrorButExpectOne.class,
76+
hasSingleFailureWithMessage("Expected test to throw an instance of java.lang.AssertionError")},
7777
{
7878
ThrowUnexpectedAssertionError.class,
7979
hasSingleFailureWithMessage(startsWith("\nExpected: an instance of java.lang.NullPointerException"))},

0 commit comments

Comments
 (0)