|
3 | 3 | package org.hamcrest.core; |
4 | 4 |
|
5 | 5 | import static org.hamcrest.core.StringEndsWith.endsWith; |
| 6 | +import static org.hamcrest.core.StringEndsWith.endsWithIgnoringCase; |
6 | 7 |
|
7 | 8 | import org.hamcrest.AbstractMatcherTest; |
8 | 9 | import org.hamcrest.Matcher; |
@@ -30,16 +31,16 @@ public void testMatchesSubstringAtEnd() { |
30 | 31 | } |
31 | 32 |
|
32 | 33 | public void testMatchesSubstringAtEndIngoringCase() { |
33 | | - final Matcher<String> ingoringCase = endsWith("EXCERpt"); |
34 | | - assertDoesNotMatch(ingoringCase, "eXCErpt" + "END"); |
35 | | - assertMatches(ingoringCase, "START" + "EXceRpt"); |
36 | | - assertMatches(ingoringCase, "EXcerPT"); |
37 | | - assertDoesNotMatch(ingoringCase, "START" + "ExcERpt" + "END"); |
38 | | - assertMatches(ingoringCase, "exCERpt" + "EXCerPt"); |
39 | | - assertDoesNotMatch(ingoringCase, "ExcER"); |
40 | | - |
41 | | - assertMismatchDescription("was \"Something else\"", ingoringCase, "Something else"); |
42 | | - assertDescription("a string ending with \"EXCERpt\" ignoring case", ingoringCase); |
| 34 | + final Matcher<String> ignoringCase = endsWithIgnoringCase("EXCERpt"); |
| 35 | + assertDoesNotMatch(ignoringCase, "eXCErpt" + "END"); |
| 36 | + assertMatches(ignoringCase, "START" + "EXceRpt"); |
| 37 | + assertMatches(ignoringCase, "EXcerPT"); |
| 38 | + assertDoesNotMatch(ignoringCase, "START" + "ExcERpt" + "END"); |
| 39 | + assertMatches(ignoringCase, "exCERpt" + "EXCerPt"); |
| 40 | + assertDoesNotMatch(ignoringCase, "ExcER"); |
| 41 | + |
| 42 | + assertMismatchDescription("was \"Something else\"", ignoringCase, "Something else"); |
| 43 | + assertDescription("a string ending with \"EXCERpt\" ignoring case", ignoringCase); |
43 | 44 | } |
44 | 45 |
|
45 | 46 | } |
0 commit comments