File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
library/org/hamcrest/object
unit-test/org/hamcrest/object Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public void describeTo(Description description) {
24
24
}
25
25
26
26
@ Factory
27
- public static <T > Matcher <T > asString (Matcher <String > toStringMatcher ) {
27
+ public static <T > Matcher <T > hasToString (Matcher <String > toStringMatcher ) {
28
28
return new HasToString <T >(toStringMatcher );
29
29
}
30
30
}
Original file line number Diff line number Diff line change 8
8
import static org .hamcrest .MatcherAssert .assertThat ;
9
9
import static org .hamcrest .core .IsEqual .equalTo ;
10
10
import static org .hamcrest .core .IsNot .not ;
11
- import static org .hamcrest .object .HasToString .asString ;
11
+ import static org .hamcrest .object .HasToString .hasToString ;
12
12
13
13
public class HasToStringTest extends AbstractMatcherTest {
14
14
@@ -20,17 +20,17 @@ public String toString() {
20
20
};
21
21
22
22
protected Matcher <?> createMatcher () {
23
- return asString (equalTo ("irrelevant" ));
23
+ return hasToString (equalTo ("irrelevant" ));
24
24
}
25
25
26
26
public void testPassesResultOfToStringToNestedMatcher () {
27
- assertThat (ARG , asString (equalTo (TO_STRING_RESULT )));
28
- assertThat (ARG , not (asString (equalTo ("OTHER STRING" ))));
27
+ assertThat (ARG , hasToString (equalTo (TO_STRING_RESULT )));
28
+ assertThat (ARG , not (hasToString (equalTo ("OTHER STRING" ))));
29
29
}
30
30
31
31
public void testHasReadableDescription () {
32
32
Matcher <String > toStringMatcher = equalTo (TO_STRING_RESULT );
33
- Matcher matcher = asString (toStringMatcher );
33
+ Matcher matcher = hasToString (toStringMatcher );
34
34
35
35
assertEquals ("asString(" + descriptionOf (toStringMatcher ) + ")" , descriptionOf (matcher ));
36
36
}
You can’t perform that action at this time.
0 commit comments