diff --git a/hamcrest-core/src/test/java/org/hamcrest/core/StringEndsWithTest.java b/hamcrest-core/src/test/java/org/hamcrest/core/StringEndsWithTest.java index a4eff97e..7ad87193 100644 --- a/hamcrest-core/src/test/java/org/hamcrest/core/StringEndsWithTest.java +++ b/hamcrest-core/src/test/java/org/hamcrest/core/StringEndsWithTest.java @@ -18,18 +18,14 @@ protected Matcher createMatcher() { } public void testMatchesSubstringAtEnd() { - assertMatches(stringEndsWith, EXCERPT + "END"); + assertDoesNotMatch(stringEndsWith, EXCERPT + "END"); assertMatches(stringEndsWith, "START" + EXCERPT); + assertMatches(stringEndsWith, EXCERPT); assertDoesNotMatch(stringEndsWith, "START" + EXCERPT + "END"); assertMatches(stringEndsWith, EXCERPT + EXCERPT); assertDoesNotMatch(stringEndsWith, "EXCER"); - assertMismatchDescription("bad", stringEndsWith, "Something else"); - } - - public void testEvaluatesToTrueIfArgumentIsEqualToSubstring() { - assertTrue("should be true if excerpt is entire string", - stringEndsWith.matches(EXCERPT)); + assertMismatchDescription("was \"Something else\"", stringEndsWith, "Something else"); } public void testHasAReadableDescription() {