File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
library/org/hamcrest/core
unit-test/org/hamcrest/core Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public void describeTo(Description description) {
34
34
}
35
35
36
36
@ Factory
37
- public static <T > Matcher <T > isA (Class <T > instanceOf ) {
37
+ public static <T > Matcher <T > instanceOf (Class <T > instanceOf ) {
38
38
return new IsInstanceOf <T >(instanceOf );
39
39
}
40
40
Original file line number Diff line number Diff line change 5
5
import org .hamcrest .AbstractMatcherTest ;
6
6
import org .hamcrest .Matcher ;
7
7
import static org .hamcrest .MatcherAssert .assertThat ;
8
- import static org .hamcrest .core .IsInstanceOf .isA ;
8
+ import static org .hamcrest .core .IsInstanceOf .instanceOf ;
9
9
import static org .hamcrest .core .IsNot .not ;
10
10
11
11
public class IsInstanceOfTest extends AbstractMatcherTest {
12
12
13
13
protected Matcher <?> createMatcher () {
14
- return isA (Number .class );
14
+ return instanceOf (Number .class );
15
15
}
16
16
17
17
public void testEvaluatesToTrueIfArgumentIsInstanceOfASpecificClass () {
18
- assertThat (1 , isA (Number .class ));
19
- assertThat (1.0 , isA (Number .class ));
20
- assertThat (null , not (isA (Number .class )));
18
+ assertThat (1 , instanceOf (Number .class ));
19
+ assertThat (1.0 , instanceOf (Number .class ));
20
+ assertThat (null , not (instanceOf (Number .class )));
21
21
}
22
22
23
23
}
You can’t perform that action at this time.
0 commit comments