33import org .hamcrest .AbstractMatcherTest ;
44import org .hamcrest .Matcher ;
55import static org .hamcrest .MatcherAssert .assertThat ;
6- import static org .hamcrest .object .IsCompatibleType .compatibleType ;
6+ import static org .hamcrest .object .IsCompatibleType .classCompatibleWith ;
77
88public class IsCompatibleTypeTest extends AbstractMatcherTest {
99 public static class BaseClass {
@@ -22,27 +22,27 @@ public static class ClassImplementingBaseInterface implements BaseInterface {
2222 }
2323
2424 protected Matcher <?> createMatcher () {
25- return compatibleType (BaseClass .class );
25+ return classCompatibleWith (BaseClass .class );
2626 }
2727
2828 public void testMatchesSameClass () {
29- assertThat (BaseClass .class , compatibleType (BaseClass .class ));
29+ assertThat (BaseClass .class , classCompatibleWith (BaseClass .class ));
3030 }
3131
3232 public void testMatchesSameInterface () {
33- assertThat (BaseInterface .class , compatibleType (BaseInterface .class ));
33+ assertThat (BaseInterface .class , classCompatibleWith (BaseInterface .class ));
3434 }
3535
3636 public void testMatchesExtendedClass () {
37- assertThat (ExtendedClass .class , compatibleType (BaseClass .class ));
37+ assertThat (ExtendedClass .class , classCompatibleWith (BaseClass .class ));
3838 }
3939
4040 public void testMatchesClassImplementingInterface () {
41- assertThat (ClassImplementingBaseInterface .class , compatibleType (BaseInterface .class ));
41+ assertThat (ClassImplementingBaseInterface .class , classCompatibleWith (BaseInterface .class ));
4242 }
4343
4444 public void testMatchesExtendedInterface () {
45- assertThat (ExtendedInterface .class , compatibleType (BaseInterface .class ));
45+ assertThat (ExtendedInterface .class , classCompatibleWith (BaseInterface .class ));
4646 }
4747
4848// public void testDoesNotMatchIncompatibleTypes() {
@@ -51,6 +51,6 @@ public void testMatchesExtendedInterface() {
5151// }
5252
5353 public void testHasReadableDescription () {
54- assertDescription ("type < java.lang.Runnable" , compatibleType (Runnable .class ));
54+ assertDescription ("type < java.lang.Runnable" , classCompatibleWith (Runnable .class ));
5555 }
5656}
0 commit comments