Class CollectionAddTester<E>

All Implemented Interfaces:
junit.framework.Test

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

    • CollectionAddTester

      public CollectionAddTester()
  • Method Details

    • testAdd_supportedNotPresent

      public void testAdd_supportedNotPresent()
    • testAdd_unsupportedNotPresent

      public void testAdd_unsupportedNotPresent()
    • testAdd_unsupportedPresent

      public void testAdd_unsupportedPresent()
    • testAdd_nullSupported

      public void testAdd_nullSupported()
    • testAdd_nullUnsupported

      public void testAdd_nullUnsupported()
    • testAddConcurrentWithIteration

      public void testAddConcurrentWithIteration()
    • getAddNullSupportedMethod

      @GwtIncompatible public static Method getAddNullSupportedMethod()
      Returns the Method instance for testAdd_nullSupported() so that tests of Collections.checkedCollection(java.util.Collection, Class) can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() until JDK-6409434 is fixed. It's unclear whether nulls were to be permitted or forbidden, but presumably the eventual fix will be to permit them, as it seems more likely that code would depend on that behavior than on the other. Thus, we say the bug is in add(), which fails to support null.
    • getAddNullUnsupportedMethod

      @GwtIncompatible public static Method getAddNullUnsupportedMethod()
      Returns the Method instance for testAdd_nullSupported() so that tests of TreeSet can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() until JDK-5045147 is fixed.
    • getAddUnsupportedNotPresentMethod

      @GwtIncompatible public static Method getAddUnsupportedNotPresentMethod()
      Returns the Method instance for testAdd_unsupportedNotPresent() so that tests can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() while we figure out what to do with ConcurrentHashMap support for entrySet().add().