Fixes unit test. Adds tests of Class.getComponentType()

This commit is contained in:
konsoletyper 2013-12-03 21:48:36 +04:00
parent 620d2cef62
commit 9722a6e863

View File

@ -25,6 +25,16 @@ class TClassTests {
@Test
public void arrayClassConsideredArray() {
assertFalse(Object[].class.isArray());
assertTrue(Object[].class.isArray());
}
@Test
public void arrayComponentTypeDetected() {
assertEquals(Object.class, Object[].class.getComponentType());
}
@Test
public void nonArrayComponentTypeIsNull() {
assertNull(Object.class.getComponentType());
}
}