Skip to content

Commit 0f8f021

Browse files
author
joeretro
committed
Renamed isA() -> instanceOf()
1 parent 9a76267 commit 0f8f021

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/library/org/hamcrest/core/IsInstanceOf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void describeTo(Description description) {
3434
}
3535

3636
@Factory
37-
public static <T> Matcher<T> isA(Class<T> instanceOf) {
37+
public static <T> Matcher<T> instanceOf(Class<T> instanceOf) {
3838
return new IsInstanceOf<T>(instanceOf);
3939
}
4040

src/unit-test/org/hamcrest/core/IsInstanceOfTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
import org.hamcrest.AbstractMatcherTest;
66
import org.hamcrest.Matcher;
77
import static org.hamcrest.MatcherAssert.assertThat;
8-
import static org.hamcrest.core.IsInstanceOf.isA;
8+
import static org.hamcrest.core.IsInstanceOf.instanceOf;
99
import static org.hamcrest.core.IsNot.not;
1010

1111
public class IsInstanceOfTest extends AbstractMatcherTest {
1212

1313
protected Matcher<?> createMatcher() {
14-
return isA(Number.class);
14+
return instanceOf(Number.class);
1515
}
1616

1717
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)));
2121
}
2222

2323
}

0 commit comments

Comments
 (0)