File tree Expand file tree Collapse file tree
library/org/hamcrest/object
unit-test/org/hamcrest/object Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public void describeTo(Description description) {
2424 }
2525
2626 @ Factory
27- public static <T > Matcher <T > asString (Matcher <String > toStringMatcher ) {
27+ public static <T > Matcher <T > hasToString (Matcher <String > toStringMatcher ) {
2828 return new HasToString <T >(toStringMatcher );
2929 }
3030}
Original file line number Diff line number Diff line change 88import static org .hamcrest .MatcherAssert .assertThat ;
99import static org .hamcrest .core .IsEqual .equalTo ;
1010import static org .hamcrest .core .IsNot .not ;
11- import static org .hamcrest .object .HasToString .asString ;
11+ import static org .hamcrest .object .HasToString .hasToString ;
1212
1313public class HasToStringTest extends AbstractMatcherTest {
1414
@@ -20,17 +20,17 @@ public String toString() {
2020 };
2121
2222 protected Matcher <?> createMatcher () {
23- return asString (equalTo ("irrelevant" ));
23+ return hasToString (equalTo ("irrelevant" ));
2424 }
2525
2626 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" ))));
2929 }
3030
3131 public void testHasReadableDescription () {
3232 Matcher <String > toStringMatcher = equalTo (TO_STRING_RESULT );
33- Matcher matcher = asString (toStringMatcher );
33+ Matcher matcher = hasToString (toStringMatcher );
3434
3535 assertEquals ("asString(" + descriptionOf (toStringMatcher ) + ")" , descriptionOf (matcher ));
3636 }
You can’t perform that action at this time.
0 commit comments