Class CollectionToArrayTester<E>

All Implemented Interfaces:
junit.framework.Test

@GwtCompatible(emulated=true) public class CollectionToArrayTester<E> extends AbstractCollectionTester<E>
A generic JUnit test which tests toArray() operations on a collection. Can't be invoked directly; please see CollectionTestSuiteBuilder.
Author:
Kevin Bourrillion, Chris Povirk
  • Constructor Details

    • CollectionToArrayTester

      public CollectionToArrayTester()
  • Method Details

    • testToArray_noArgs

      public void testToArray_noArgs()
    • testToArray_isPlainObjectArray

      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[].

    • testToArray_emptyArray

      public void testToArray_emptyArray()
    • testToArray_emptyArray_ordered

      public void testToArray_emptyArray_ordered()
    • testToArray_emptyArrayOfObject

      public void testToArray_emptyArrayOfObject()
    • testToArray_rightSizedArray

      public void testToArray_rightSizedArray()
    • testToArray_rightSizedArray_ordered

      public void testToArray_rightSizedArray_ordered()
    • testToArray_rightSizedArrayOfObject

      public void testToArray_rightSizedArrayOfObject()
    • testToArray_rightSizedArrayOfObject_ordered

      public void testToArray_rightSizedArrayOfObject_ordered()
    • testToArray_oversizedArray

      public void testToArray_oversizedArray()
    • testToArray_oversizedArray_ordered

      public void testToArray_oversizedArray_ordered()
    • testToArray_emptyArrayOfWrongTypeForNonEmptyCollection

      public void testToArray_emptyArrayOfWrongTypeForNonEmptyCollection()
    • testToArray_emptyArrayOfWrongTypeForEmptyCollection

      public void testToArray_emptyArrayOfWrongTypeForEmptyCollection()
    • getToArrayIsPlainObjectArrayMethod

      @GwtIncompatible public static Method getToArrayIsPlainObjectArrayMethod()
      Returns the Method instance for testToArray_isPlainObjectArray() so that tests of Arrays.asList(Object[]) can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() until JDK-6260652 is fixed.