3
3
import org .hamcrest .AbstractMatcherTest ;
4
4
import org .hamcrest .Matcher ;
5
5
import static org .hamcrest .MatcherAssert .assertThat ;
6
- import static org .hamcrest .object .IsCompatibleType .classCompatibleWith ;
6
+ import static org .hamcrest .object .IsCompatibleType .typeCompatibleWith ;
7
7
8
8
public class IsCompatibleTypeTest extends AbstractMatcherTest {
9
9
public static class BaseClass {
@@ -22,27 +22,27 @@ public static class ClassImplementingBaseInterface implements BaseInterface {
22
22
}
23
23
24
24
protected Matcher <?> createMatcher () {
25
- return classCompatibleWith (BaseClass .class );
25
+ return typeCompatibleWith (BaseClass .class );
26
26
}
27
27
28
28
public void testMatchesSameClass () {
29
- assertThat (BaseClass .class , classCompatibleWith (BaseClass .class ));
29
+ assertThat (BaseClass .class , typeCompatibleWith (BaseClass .class ));
30
30
}
31
31
32
32
public void testMatchesSameInterface () {
33
- assertThat (BaseInterface .class , classCompatibleWith (BaseInterface .class ));
33
+ assertThat (BaseInterface .class , typeCompatibleWith (BaseInterface .class ));
34
34
}
35
35
36
36
public void testMatchesExtendedClass () {
37
- assertThat (ExtendedClass .class , classCompatibleWith (BaseClass .class ));
37
+ assertThat (ExtendedClass .class , typeCompatibleWith (BaseClass .class ));
38
38
}
39
39
40
40
public void testMatchesClassImplementingInterface () {
41
- assertThat (ClassImplementingBaseInterface .class , classCompatibleWith (BaseInterface .class ));
41
+ assertThat (ClassImplementingBaseInterface .class , typeCompatibleWith (BaseInterface .class ));
42
42
}
43
43
44
44
public void testMatchesExtendedInterface () {
45
- assertThat (ExtendedInterface .class , classCompatibleWith (BaseInterface .class ));
45
+ assertThat (ExtendedInterface .class , typeCompatibleWith (BaseInterface .class ));
46
46
}
47
47
48
48
// public void testDoesNotMatchIncompatibleTypes() {
@@ -51,6 +51,6 @@ public void testMatchesExtendedInterface() {
51
51
// }
52
52
53
53
public void testHasReadableDescription () {
54
- assertDescription ("type < java.lang.Runnable" , classCompatibleWith (Runnable .class ));
54
+ assertDescription ("type < java.lang.Runnable" , typeCompatibleWith (Runnable .class ));
55
55
}
56
56
}
0 commit comments