Class AbstractTestBidiMap

java.lang.Object
junit.framework.Assert
All Implemented Interfaces:
Cloneable, junit.framework.Test
Direct Known Subclasses:
AbstractTestBidiMap.TestInverseBidiMap, AbstractTestOrderedBidiMap

public abstract class AbstractTestBidiMap extends AbstractTestMap
Abstract test class for BidiMap methods and contracts.
  • Field Details

    • entries

      protected final Object[][] entries
  • Constructor Details

    • AbstractTestBidiMap

      public AbstractTestBidiMap(String testName)
    • AbstractTestBidiMap

      public AbstractTestBidiMap()
  • Method Details

    • makeEmptyBidiMap

      public abstract org.apache.commons.collections.BidiMap makeEmptyBidiMap()
      Implement to create an empty BidiMap.
      Returns:
      an empty BidiMap implementation.
    • makeFullBidiMap

      public org.apache.commons.collections.BidiMap makeFullBidiMap()
      Override to create a full BidiMap other than the default.
      Returns:
      a full BidiMap implementation.
    • makeEmptyMap

      public final Map makeEmptyMap()
      Override to return the empty BidiMap.
      Specified by:
      makeEmptyMap in class AbstractTestMap
      Returns:
      the map to be tested
    • isAllowDuplicateValues

      public boolean isAllowDuplicateValues()
      Override to indicate to AbstractTestMap this is a BidiMap.
      Overrides:
      isAllowDuplicateValues in class AbstractTestMap
    • getCompatibilityVersion

      public String getCompatibilityVersion()
      Override as DualHashBidiMap didn't exist until version 3.
      Overrides:
      getCompatibilityVersion in class AbstractTestMap
      Returns:
      The version, or null if this object shouldn't be tested for compatibility with previous versions.
    • testBidiPut

      public void testBidiPut()
    • verify

      public void verify()
      Verifies that AbstractTestMap.map is still equal to AbstractTestMap.confirmed.

      This implementation checks the inverse map as well.

      Overrides:
      verify in class AbstractTestMap
    • verifyInverse

      public void verifyInverse()
    • testBidiGetKey

      public void testBidiGetKey()
    • testBidiGetKeyInverse

      public void testBidiGetKeyInverse()
    • testBidiInverse

      public void testBidiInverse()
    • testBidiModifyEntrySet

      public void testBidiModifyEntrySet()
    • testBidiClear

      public void testBidiClear()
    • testBidiRemove

      public void testBidiRemove()
    • testBidiKeySetValuesOrder

      public void testBidiKeySetValuesOrder()
    • testBidiRemoveByKeySet

      public void testBidiRemoveByKeySet()
    • testBidiRemoveByEntrySet

      public void testBidiRemoveByEntrySet()
    • bulkTestMapEntrySet

      public BulkTest bulkTestMapEntrySet()
      Description copied from class: AbstractTestMap
      Bulk test Map.entrySet(). This method runs through all of the tests in AbstractTestSet. After modification operations, AbstractTestMap.verify() is invoked to ensure that the map and the other collection views are still valid.
      Overrides:
      bulkTestMapEntrySet in class AbstractTestMap
      Returns:
      a AbstractTestSet instance for testing the map's entry set
    • bulkTestInverseMap

      public BulkTest bulkTestInverseMap()
    • bulkTestBidiMapIterator

      public BulkTest bulkTestBidiMapIterator()
    • testBidiMapIteratorSet

      public void testBidiMapIteratorSet()