Skip to content

Commit

Permalink
tidying tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sf105 committed May 28, 2014
1 parent 91df515 commit ba93251
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ba93251

Please sign in to comment.