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:
java.lang.Cloneable,junit.framework.Test
- Direct Known Subclasses:
AbstractTestBidiMap.TestInverseBidiMap,AbstractTestOrderedBidiMap
public abstract class AbstractTestBidiMap extends AbstractTestMap
Abstract test class forBidiMapmethods and contracts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractTestBidiMap.TestBidiMapEntrySetclassAbstractTestBidiMap.TestBidiMapIteratorclassAbstractTestBidiMap.TestInverseBidiMap-
Nested classes/interfaces inherited from class org.apache.commons.collections.map.AbstractTestMap
AbstractTestMap.TestMapEntrySet, AbstractTestMap.TestMapKeySet, AbstractTestMap.TestMapValues
-
-
Field Summary
Fields Modifier and Type Field Description 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
Constructors Constructor Description AbstractTestBidiMap()AbstractTestBidiMap(java.lang.String testName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BulkTestbulkTestBidiMapIterator()BulkTestbulkTestInverseMap()BulkTestbulkTestMapEntrySet()Bulk testMap.entrySet().java.lang.StringgetCompatibilityVersion()Override as DualHashBidiMap didn't exist until version 3.booleanisAllowDuplicateValues()Override to indicate to AbstractTestMap this is a BidiMap.abstract org.apache.commons.collections.BidiMapmakeEmptyBidiMap()Implement to create an emptyBidiMap.java.util.MapmakeEmptyMap()Override to return the empty BidiMap.org.apache.commons.collections.BidiMapmakeFullBidiMap()Override to create a fullBidiMapother than the default.voidtestBidiClear()voidtestBidiGetKey()voidtestBidiGetKeyInverse()voidtestBidiInverse()voidtestBidiKeySetValuesOrder()voidtestBidiMapIteratorSet()voidtestBidiModifyEntrySet()voidtestBidiPut()voidtestBidiRemove()voidtestBidiRemoveByEntrySet()voidtestBidiRemoveByKeySet()voidverify()Verifies thatAbstractTestMap.mapis still equal toAbstractTestMap.confirmed.voidverifyInverse()-
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
-
-
-
-
Method Detail
-
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
public final java.util.Map 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
public java.lang.String 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
public BulkTest 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
public BulkTest bulkTestInverseMap()
-
bulkTestBidiMapIterator
public BulkTest bulkTestBidiMapIterator()
-
testBidiMapIteratorSet
public void testBidiMapIteratorSet()
-
-