コード例 #1
0
 @Test
 public void testToArray_AsGenericType_SmallSize() {
   Integer[] a = new Integer[randomInt()];
   Integer[] array = list.toArray(a);
   assertParamsEquals(array, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
 }
コード例 #2
0
 @Test
 public void testToArray_AsGenericType_GreaterSize() {
   Integer[] a = new Integer[SIZE + 1];
   Integer[] array = list.toArray(a);
   assertParamsEquals(array, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, null);
 }
コード例 #3
0
 @Test
 public void testToArray_AsObject() {
   Object[] array = list.toArray();
   assertParamsEquals(array, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
 }