public void testToArray_noArgs() { Object[] array = collection.toArray(); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_emptyArrayOfObject() { Object[] in = new Object[0]; Object[] array = collection.toArray(in); assertEquals( "toArray(emptyObject[]) should return an array of type Object", Object[].class, array.getClass()); assertEquals("toArray(emptyObject[]).length", getNumElements(), array.length); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_rightSizedArrayOfObject() { Object[] array = new Object[getNumElements()]; assertSame( "toArray(sameSizeObject[]) should return the given array", array, collection.toArray(array)); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_emptyArray() { E[] empty = getSubjectGenerator().createArray(0); E[] array = collection.toArray(empty); assertEquals( "toArray(emptyT[]) should return an array of type T", empty.getClass(), array.getClass()); assertEquals("toArray(emptyT[]).length:", getNumElements(), array.length); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_rightSizedArray() { E[] array = getSubjectGenerator().createArray(getNumElements()); assertSame( "toArray(sameSizeE[]) should return the given array", array, collection.toArray(array)); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_noArgs() { Object[] array = collection.toArray(); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_noArgs() { Object[] array = collection.toArray(); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_rightSizedArrayOfObject() { Object[] array = new Object[getNumElements()]; assertSame( "toArray(sameSizeObject[]) should return the given array", array, collection.toArray(array)); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_rightSizedArrayOfObject() { Object[] array = new Object[getNumElements()]; assertSame("toArray(sameSizeObject[]) should return the given array", array, collection.toArray(array)); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_emptyArrayOfObject() { Object[] in = new Object[0]; Object[] array = collection.toArray(in); assertEquals("toArray(emptyObject[]) should return an array of type Object", Object[].class, array.getClass()); assertEquals("toArray(emptyObject[]).length", getNumElements(), array.length); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_emptyArrayOfObject() { Object[] in = new Object[0]; Object[] array = collection.toArray(in); assertEquals( "toArray(emptyObject[]) should return an array of type Object", Object[].class, array.getClass()); assertEquals("toArray(emptyObject[]).length", getNumElements(), array.length); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_emptyArray() { E[] empty = getSubjectGenerator().createArray(0); E[] array = collection.toArray(empty); assertEquals("toArray(emptyT[]) should return an array of type T", empty.getClass(), array.getClass()); assertEquals("toArray(emptyT[]).length:", getNumElements(), array.length); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_emptyArray() { E[] empty = getSubjectGenerator().createArray(0); E[] array = collection.toArray(empty); assertEquals( "toArray(emptyT[]) should return an array of type T", empty.getClass(), array.getClass()); assertEquals("toArray(emptyT[]).length:", getNumElements(), array.length); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_rightSizedArray() { E[] array = getSubjectGenerator().createArray(getNumElements()); assertSame( "toArray(sameSizeE[]) should return the given array", array, collection.toArray(array)); expectArrayContentsAnyOrder(createSamplesArray(), array); }
public void testToArray_rightSizedArray() { E[] array = getSubjectGenerator().createArray(getNumElements()); assertSame("toArray(sameSizeE[]) should return the given array", array, collection.toArray(array)); expectArrayContentsAnyOrder(createSamplesArray(), array); }