Class MapCreationTester<K,V>

java.lang.Object
junit.framework.Assert
All Implemented Interfaces:
junit.framework.Test

public class MapCreationTester<K,V> extends AbstractMapTester<K,V>
A generic JUnit test which tests creation (typically through a constructor or static factory method) of a map. Can't be invoked directly; please see MapTestSuiteBuilder.
  • Constructor Details

    • MapCreationTester

      public MapCreationTester()
  • Method Details

    • testCreateWithNullKeySupported

      public void testCreateWithNullKeySupported()
    • testCreateWithNullKeyUnsupported

      public void testCreateWithNullKeyUnsupported()
    • testCreateWithNullValueSupported

      public void testCreateWithNullValueSupported()
    • testCreateWithNullValueUnsupported

      public void testCreateWithNullValueUnsupported()
    • testCreateWithNullKeyAndValueSupported

      public void testCreateWithNullKeyAndValueSupported()
    • testCreateWithDuplicates_nullDuplicatesNotRejected

      public void testCreateWithDuplicates_nullDuplicatesNotRejected()
    • testCreateWithDuplicates_nonNullDuplicatesNotRejected

      public void testCreateWithDuplicates_nonNullDuplicatesNotRejected()
    • testCreateWithDuplicates_nullDuplicatesRejected

      public void testCreateWithDuplicates_nullDuplicatesRejected()
    • testCreateWithDuplicates_nonNullDuplicatesRejected

      public void testCreateWithDuplicates_nonNullDuplicatesRejected()
    • getEntriesMultipleNullKeys

      private Map.Entry<K,V>[] getEntriesMultipleNullKeys()
    • getEntriesMultipleNonNullKeys

      private Map.Entry<K,V>[] getEntriesMultipleNonNullKeys()
    • expectFirstRemoved

      private void expectFirstRemoved(Map.Entry<K,V>[] entries)
    • getCreateWithNullKeyUnsupportedMethod

      public static Method getCreateWithNullKeyUnsupportedMethod()
      Returns the Method instance for testCreateWithNullKeyUnsupported() so that tests can suppress it with FeatureSpecificTestSuiteBuilder.suppressing() until Sun bug 5045147 is fixed.