File tree Expand file tree Collapse file tree
hamcrest-library/src/main/java/org/hamcrest Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1219,7 +1219,7 @@ public static <T extends java.lang.Comparable<T>> org.hamcrest.Matcher<T> lessTh
12191219 * @param expectedString the expected value of matched strings
12201220 */
12211221 public static org .hamcrest .Matcher <java .lang .String > equalToIgnoringCase (java .lang .String expectedString ) {
1222- return org . hamcrest . text . IsEqualIgnoringCase .equalToIgnoringCase (expectedString );
1222+ return MatchStrings .equalToIgnoringCase (expectedString );
12231223 }
12241224
12251225 /**
@@ -1236,7 +1236,7 @@ public static org.hamcrest.Matcher<java.lang.String> equalToIgnoringCase(java.la
12361236 * @param expectedString the expected value of matched strings
12371237 */
12381238 public static org .hamcrest .Matcher <java .lang .String > equalToIgnoringWhiteSpace (java .lang .String expectedString ) {
1239- return org . hamcrest . text . IsEqualIgnoringWhiteSpace .equalToIgnoringWhiteSpace (expectedString );
1239+ return MatchStrings .equalToIgnoringWhiteSpace (expectedString );
12401240 }
12411241
12421242 /**
Original file line number Diff line number Diff line change 33package org .hamcrest .text ;
44
55import org .hamcrest .Description ;
6- import org .hamcrest .Matcher ;
76import org .hamcrest .TypeSafeMatcher ;
87
98/**
@@ -34,18 +33,4 @@ public void describeTo(Description description) {
3433 .appendValue (string )
3534 .appendText (")" );
3635 }
37-
38- /**
39- * Creates a matcher of {@link String} that matches when the examined string is equal to
40- * the specified expectedString, ignoring case.
41- * For example:
42- * <pre>assertThat("Foo", equalToIgnoringCase("FOO"))</pre>
43- *
44- * @param expectedString
45- * the expected value of matched strings
46- */
47- public static Matcher <String > equalToIgnoringCase (String expectedString ) {
48- return new IsEqualIgnoringCase (expectedString );
49- }
50-
5136}
Original file line number Diff line number Diff line change 33package org .hamcrest .text ;
44
55import org .hamcrest .Description ;
6- import org .hamcrest .Matcher ;
76import org .hamcrest .TypeSafeMatcher ;
87
98import static java .lang .Character .isWhitespace ;
@@ -54,23 +53,4 @@ public String stripSpace(String toBeStripped) {
5453 }
5554 return result .toString ().trim ();
5655 }
57-
58- /**
59- * Creates a matcher of {@link String} that matches when the examined string is equal to
60- * the specified expectedString, when whitespace differences are (mostly) ignored. To be
61- * exact, the following whitespace rules are applied:
62- * <ul>
63- * <li>all leading and trailing whitespace of both the expectedString and the examined string are ignored</li>
64- * <li>any remaining whitespace, appearing within either string, is collapsed to a single space before comparison</li>
65- * </ul>
66- * For example:
67- * <pre>assertThat(" my\tfoo bar ", equalToIgnoringWhiteSpace(" my foo bar"))</pre>
68- *
69- * @param expectedString
70- * the expected value of matched strings
71- */
72- public static Matcher <String > equalToIgnoringWhiteSpace (String expectedString ) {
73- return new IsEqualIgnoringWhiteSpace (expectedString );
74- }
75-
7656}
You can’t perform that action at this time.
0 commit comments