Class AbstractTestBidiMap
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.commons.collections.BulkTest
org.apache.commons.collections.AbstractTestObject
org.apache.commons.collections.map.AbstractTestMap
org.apache.commons.collections.bidimap.AbstractTestBidiMap
- All Implemented Interfaces:
Cloneable,junit.framework.Test
- Direct Known Subclasses:
AbstractTestBidiMap.TestInverseBidiMap,AbstractTestOrderedBidiMap
Abstract test class for
BidiMap methods and contracts.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassNested classes/interfaces inherited from class org.apache.commons.collections.map.AbstractTestMap
AbstractTestMap.TestMapEntrySet, AbstractTestMap.TestMapKeySet, AbstractTestMap.TestMapValues -
Field Summary
FieldsFields inherited from class org.apache.commons.collections.map.AbstractTestMap
confirmed, entrySet, keySet, map, valuesFields inherited from class org.apache.commons.collections.AbstractTestObject
COLLECTIONS_MAJOR_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBulk testMap.entrySet().Override as DualHashBidiMap didn't exist until version 3.booleanOverride to indicate to AbstractTestMap this is a BidiMap.abstract org.apache.commons.collections.BidiMapImplement to create an emptyBidiMap.final MapOverride to return the empty BidiMap.org.apache.commons.collections.BidiMapOverride to create a fullBidiMapother than the default.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidverify()Verifies thatAbstractTestMap.mapis still equal toAbstractTestMap.confirmed.voidMethods 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, verifyValuesMethods 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, writeExternalFormToDiskMethods inherited from class org.apache.commons.collections.BulkTest
clone, ignoredTests, makeSuite, toStringMethods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp
-
Field Details
-
entries
-
-
Constructor Details
-
AbstractTestBidiMap
-
AbstractTestBidiMap
public AbstractTestBidiMap()
-
-
Method Details
-
makeEmptyBidiMap
public abstract org.apache.commons.collections.BidiMap makeEmptyBidiMap()Implement to create an emptyBidiMap.- Returns:
- an empty
BidiMapimplementation.
-
makeFullBidiMap
public org.apache.commons.collections.BidiMap makeFullBidiMap()Override to create a fullBidiMapother than the default.- Returns:
- a full
BidiMapimplementation.
-
makeEmptyMap
Override to return the empty BidiMap.- Specified by:
makeEmptyMapin classAbstractTestMap- Returns:
- the map to be tested
-
isAllowDuplicateValues
public boolean isAllowDuplicateValues()Override to indicate to AbstractTestMap this is a BidiMap.- Overrides:
isAllowDuplicateValuesin classAbstractTestMap
-
getCompatibilityVersion
Override as DualHashBidiMap didn't exist until version 3.- Overrides:
getCompatibilityVersionin classAbstractTestMap- Returns:
- The version, or
nullif this object shouldn't be tested for compatibility with previous versions.
-
testBidiPut
public void testBidiPut() -
verify
public void verify()Verifies thatAbstractTestMap.mapis still equal toAbstractTestMap.confirmed.This implementation checks the inverse map as well.
- Overrides:
verifyin classAbstractTestMap
-
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
Description copied from class:AbstractTestMapBulk testMap.entrySet(). This method runs through all of the tests inAbstractTestSet. After modification operations,AbstractTestMap.verify()is invoked to ensure that the map and the other collection views are still valid.- Overrides:
bulkTestMapEntrySetin classAbstractTestMap- Returns:
- a
AbstractTestSetinstance for testing the map's entry set
-
bulkTestInverseMap
-
bulkTestBidiMapIterator
-
testBidiMapIteratorSet
public void testBidiMapIteratorSet()
-