public class CollectionToArrayTester<E> extends AbstractCollectionTester<E>
toArray() operations on a collection. Can't be invoked
directly; please see CollectionTestSuiteBuilder.AbstractContainerTester.ArrayWithDuplicate<E>collectioncontainer, samples| Constructor and Description |
|---|
CollectionToArrayTester() |
actualContents, createArrayWithNullElement, expectNullMissingWhenNullUnsupported, initCollectionWithNullElement, resetCollection, resetContainercreateArrayWithDuplicateElement, createDisjointCollection, createOrderedArray, createSamplesArray, e0, e1, e2, e3, e4, emptyCollection, expectAdded, expectAdded, expectAdded, expectContents, expectContents, expectMissing, expectUnchanged, getNullLocation, getNumElements, getOrderedElements, getSampleElements, getSampleElements, resetContainer, setUpgetName, getSubjectGenerator, getTestMethodName, init, init, tearDownassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run, run, runBare, runTest, setName, toStringpublic void testToArray_noArgs()
public void testToArray_isPlainObjectArray()
Collection.toArray(Object[]) says: "Note that toArray(new Object[0]) is
identical in function to toArray()."
For maximum effect, the collection under test should be created from an element array of a
type other than Object[].
public void testToArray_emptyArray()
public void testToArray_emptyArray_ordered()
public void testToArray_emptyArrayOfObject()
public void testToArray_rightSizedArray()
public void testToArray_rightSizedArray_ordered()
public void testToArray_rightSizedArrayOfObject()
public void testToArray_rightSizedArrayOfObject_ordered()
public void testToArray_oversizedArray()
public void testToArray_oversizedArray_ordered()
public void testToArray_emptyArrayOfWrongTypeForNonEmptyCollection()
public void testToArray_emptyArrayOfWrongTypeForEmptyCollection()
private void expectArrayContentsAnyOrder(java.lang.Object[] expected,
java.lang.Object[] actual)
private void expectArrayContentsInOrder(java.util.List<E> expected, java.lang.Object[] actual)
public static java.lang.reflect.Method getToArrayIsPlainObjectArrayMethod()
Method instance for testToArray_isPlainObjectArray() so that tests
of Arrays.asList(Object[]) can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() until Sun bug 6260652 is fixed.