org.apache.commons.collections.bidimap
Class AbstractTestBidiMap

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.collections.BulkTest
              extended by org.apache.commons.collections.AbstractTestObject
                  extended by org.apache.commons.collections.map.AbstractTestMap
                      extended by org.apache.commons.collections.bidimap.AbstractTestBidiMap
All Implemented Interfaces:
java.lang.Cloneable, junit.framework.Test
Direct Known Subclasses:
AbstractTestBidiMap.TestInverseBidiMap, AbstractTestOrderedBidiMap

public abstract class AbstractTestBidiMap
extends AbstractTestMap

Abstract test class for AbstractTestBidiMap.TestInverseBidiMap methods and contracts.


Nested Class Summary
 class AbstractTestBidiMap.TestBidiMapEntrySet
           
 class AbstractTestBidiMap.TestBidiMapIterator
           
 class AbstractTestBidiMap.TestInverseBidiMap
           
 
Nested classes/interfaces inherited from class org.apache.commons.collections.map.AbstractTestMap
AbstractTestMap.TestMapEntrySet, AbstractTestMap.TestMapKeySet, AbstractTestMap.TestMapValues
 
Field Summary
protected  java.lang.Object[][] entries
           
 
Fields inherited from class org.apache.commons.collections.map.AbstractTestMap
confirmed, entrySet, keySet, map, values
 
Fields inherited from class org.apache.commons.collections.AbstractTestObject
COLLECTIONS_MAJOR_VERSION
 
Constructor Summary
AbstractTestBidiMap()
           
AbstractTestBidiMap(java.lang.String testName)
           
 
Method Summary
 BulkTest bulkTestBidiMapIterator()
           
 BulkTest bulkTestInverseMap()
           
 BulkTest bulkTestMapEntrySet()
          Bulk test Map.entrySet().
 java.lang.String getCompatibilityVersion()
          Override as DualHashBidiMap didn't exist until version 3.
 boolean isAllowDuplicateValues()
          Override to indicate to AbstractTestMap this is a BidiMap.
abstract  BidiMap makeEmptyBidiMap()
          Implement to create an empty BidiMap.
 java.util.Map makeEmptyMap()
          Override to return the empty BidiMap.
 BidiMap makeFullBidiMap()
          Override to create a full BidiMap other than the default.
 void testBidiClear()
           
 void testBidiGetKey()
           
 void testBidiGetKeyInverse()
           
 void testBidiInverse()
           
 void testBidiKeySetValuesOrder()
           
 void testBidiMapIteratorSet()
           
 void testBidiModifyEntrySet()
           
 void testBidiPut()
           
 void testBidiRemove()
           
 void testBidiRemoveByEntrySet()
           
 void testBidiRemoveByKeySet()
           
 void verify()
          Verifies that AbstractTestMap.map is still equal to AbstractTestMap.confirmed.
 void verifyInverse()
           
 
Methods inherited from class org.apache.commons.collections.map.AbstractTestMap
addSampleMappings, bulkTestMapKeySet, bulkTestMapValues, cloneMapEntry, getNewSampleValues, getOtherKeys, getOtherNonNullStringElements, getOtherValues, getSampleKeys, getSampleValues, isAllowNullKey, isAllowNullValue, isGetStructuralModify, isPutAddSupported, isPutChangeSupported, isRemoveSupported, isSetValueSupported, isSubMapViewsSerializable, makeConfirmedMap, makeFullMap, makeObject, resetEmpty, resetFull, tearDown, testEmptyMapCompatibility, testEntrySetClearChangesMap, testEntrySetContains1, testEntrySetContains2, testEntrySetContains3, testEntrySetRemove1, testEntrySetRemove2, testEntrySetRemove3, testFullMapCompatibility, testKeySetClearChangesMap, testKeySetRemoveChangesMap, testMakeMap, testMapClear, testMapContainsKey, testMapContainsValue, testMapEquals, testMapGet, testMapHashCode, testMapIsEmpty, testMapPut, testMapPutAll, testMapPutNullKey, testMapPutNullValue, testMapRemove, testMapSize, testMapToString, testSampleMappings, testValuesClearChangesMap, testValuesRemoveChangesMap, verifyEntrySet, verifyKeySet, verifyMap, verifyValues
 
Methods inherited from class org.apache.commons.collections.AbstractTestObject
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, isEqualsCheckable, isTestSerialization, readExternalFormFromBytes, readExternalFormFromDisk, skipSerializedCanonicalTests, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testEqualsNull, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, testSerializeDeserializeThenCompare, testSimpleSerialization, writeExternalFormToBytes, writeExternalFormToDisk
 
Methods inherited from class org.apache.commons.collections.BulkTest
clone, ignoredTests, makeSuite, toString
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp
 
Methods inherited from class junit.framework.Assert
assertEquals, 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, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

entries

protected final java.lang.Object[][] entries
Constructor Detail

AbstractTestBidiMap

public AbstractTestBidiMap(java.lang.String testName)

AbstractTestBidiMap

public AbstractTestBidiMap()
Method Detail

makeEmptyBidiMap

public abstract BidiMap makeEmptyBidiMap()
Implement to create an empty BidiMap.

Returns:
an empty BidiMap implementation.

makeFullBidiMap

public BidiMap makeFullBidiMap()
Override to create a full BidiMap other than the default.

Returns:
a full BidiMap implementation.

makeEmptyMap

public final java.util.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 java.lang.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()


Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.