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 TypeClassDescriptionclass
class
class
Nested 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, values
Fields 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.boolean
Override to indicate to AbstractTestMap this is a BidiMap.abstract org.apache.commons.collections.BidiMap
Implement to create an emptyBidiMap
.final Map
Override to return the empty BidiMap.org.apache.commons.collections.BidiMap
Override to create a fullBidiMap
other than the default.void
void
void
void
void
void
void
void
void
void
void
void
verify()
Verifies thatAbstractTestMap.map
is still equal toAbstractTestMap.confirmed
.void
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
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
BidiMap
implementation.
-
makeFullBidiMap
public org.apache.commons.collections.BidiMap makeFullBidiMap()Override to create a fullBidiMap
other than the default.- Returns:
- a full
BidiMap
implementation.
-
makeEmptyMap
Override to return the empty BidiMap.- Specified by:
makeEmptyMap
in classAbstractTestMap
- Returns:
- the map to be tested
-
isAllowDuplicateValues
public boolean isAllowDuplicateValues()Override to indicate to AbstractTestMap this is a BidiMap.- Overrides:
isAllowDuplicateValues
in classAbstractTestMap
-
getCompatibilityVersion
Override as DualHashBidiMap didn't exist until version 3.- Overrides:
getCompatibilityVersion
in classAbstractTestMap
- 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 thatAbstractTestMap.map
is still equal toAbstractTestMap.confirmed
.This implementation checks the inverse map as well.
- Overrides:
verify
in 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:AbstractTestMap
Bulk 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:
bulkTestMapEntrySet
in classAbstractTestMap
- Returns:
- a
AbstractTestSet
instance for testing the map's entry set
-
bulkTestInverseMap
-
bulkTestBidiMapIterator
-
testBidiMapIteratorSet
public void testBidiMapIteratorSet()
-