File tree Expand file tree Collapse file tree 3 files changed +2
-37
lines changed
hamcrest-library/src/main/java/org/hamcrest Expand file tree Collapse file tree 3 files changed +2
-37
lines changed 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
1219
1219
* @param expectedString the expected value of matched strings
1220
1220
*/
1221
1221
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 );
1223
1223
}
1224
1224
1225
1225
/**
@@ -1236,7 +1236,7 @@ public static org.hamcrest.Matcher<java.lang.String> equalToIgnoringCase(java.la
1236
1236
* @param expectedString the expected value of matched strings
1237
1237
*/
1238
1238
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 );
1240
1240
}
1241
1241
1242
1242
/**
Original file line number Diff line number Diff line change 3
3
package org .hamcrest .text ;
4
4
5
5
import org .hamcrest .Description ;
6
- import org .hamcrest .Matcher ;
7
6
import org .hamcrest .TypeSafeMatcher ;
8
7
9
8
/**
@@ -34,18 +33,4 @@ public void describeTo(Description description) {
34
33
.appendValue (string )
35
34
.appendText (")" );
36
35
}
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
-
51
36
}
Original file line number Diff line number Diff line change 3
3
package org .hamcrest .text ;
4
4
5
5
import org .hamcrest .Description ;
6
- import org .hamcrest .Matcher ;
7
6
import org .hamcrest .TypeSafeMatcher ;
8
7
9
8
import static java .lang .Character .isWhitespace ;
@@ -54,23 +53,4 @@ public String stripSpace(String toBeStripped) {
54
53
}
55
54
return result .toString ().trim ();
56
55
}
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
-
76
56
}
You can’t perform that action at this time.
0 commit comments