Class AbstractTestSortedMap.TestViewMap
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.map.AbstractTestSortedMap
org.apache.commons.collections.map.AbstractTestSortedMap.TestViewMap
- All Implemented Interfaces:
Cloneable,junit.framework.Test
- Direct Known Subclasses:
AbstractTestSortedMap.TestHeadMap,AbstractTestSortedMap.TestSubMap,AbstractTestSortedMap.TestTailMap
- Enclosing class:
AbstractTestSortedMap
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.collections.map.AbstractTestSortedMap
AbstractTestSortedMap.TestHeadMap, AbstractTestSortedMap.TestSubMap, AbstractTestSortedMap.TestTailMap, AbstractTestSortedMap.TestViewMapNested classes/interfaces inherited from class org.apache.commons.collections.map.AbstractTestMap
AbstractTestMap.TestMapEntrySet, AbstractTestMap.TestMapKeySet, AbstractTestMap.TestMapValues -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AbstractTestMapprotected final Listprotected final Listprotected final ListFields 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 TypeMethodDescriptionObject[]Returns a the set of values that can be used to replace the values returned fromAbstractTestMap.getSampleValues().Object[]Returns the set of keys in the mappings used to test the map.Object[]Returns the set of values in the mappings used to test the map.booleanCan't sort null keys.booleanReturns true if the maps produced byAbstractTestMap.makeEmptyMap()andAbstractTestMap.makeFullMap()supports null values.booleanReturns true if the maps produced byAbstractTestMap.makeEmptyMap()andAbstractTestMap.makeFullMap()support theputandputAlloperations adding new mappings.booleanReturns true if the maps produced byAbstractTestMap.makeEmptyMap()andAbstractTestMap.makeFullMap()support theputandputAlloperations changing existing mappings.booleanReturns true if the maps produced byAbstractTestMap.makeEmptyMap()andAbstractTestMap.makeFullMap()support theremoveandclearoperations.booleanIs serialization testing supported.voidResets theAbstractTestMap.map,AbstractTestMap.entrySet,AbstractTestMap.keySet,AbstractTestMap.valuesandAbstractTestMap.confirmedfields to empty.voidResets theAbstractTestMap.map,AbstractTestMap.entrySet,AbstractTestMap.keySet,AbstractTestMap.valuesandAbstractTestMap.confirmedfields to full.voidverify()Verifies thatAbstractTestMap.mapis still equal toAbstractTestMap.confirmed.Methods inherited from class org.apache.commons.collections.map.AbstractTestSortedMap
makeConfirmedMap, testComparator, testFirstKey, testLastKeyMethods inherited from class org.apache.commons.collections.map.AbstractTestMap
addSampleMappings, bulkTestMapEntrySet, bulkTestMapKeySet, bulkTestMapValues, cloneMapEntry, getCompatibilityVersion, getOtherKeys, getOtherNonNullStringElements, getOtherValues, isAllowDuplicateValues, isGetStructuralModify, isSetValueSupported, isSubMapViewsSerializable, makeEmptyMap, makeFullMap, makeObject, 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, 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
-
main
-
subSortedKeys
-
subSortedValues
-
subSortedNewValues
-
-
Constructor Details
-
TestViewMap
-
-
Method Details
-
resetEmpty
public void resetEmpty()Description copied from class:AbstractTestMapResets theAbstractTestMap.map,AbstractTestMap.entrySet,AbstractTestMap.keySet,AbstractTestMap.valuesandAbstractTestMap.confirmedfields to empty.- Overrides:
resetEmptyin classAbstractTestMap
-
resetFull
public void resetFull()Description copied from class:AbstractTestMapResets theAbstractTestMap.map,AbstractTestMap.entrySet,AbstractTestMap.keySet,AbstractTestMap.valuesandAbstractTestMap.confirmedfields to full.- Overrides:
resetFullin classAbstractTestMap
-
verify
public void verify()Description copied from class:AbstractTestMapVerifies thatAbstractTestMap.mapis still equal toAbstractTestMap.confirmed. This method checks that the map is equal to the HashMap, and that the map's collection views are still equal to the HashMap's collection views. Anequalstest is done on the maps and their collection views; their size andisEmptyresults are compared; their hashCodes are compared; andcontainsAlltests are run on the collection views.- Overrides:
verifyin classAbstractTestMap
-
bulkTestHeadMap
- Overrides:
bulkTestHeadMapin classAbstractTestSortedMap
-
bulkTestTailMap
- Overrides:
bulkTestTailMapin classAbstractTestSortedMap
-
bulkTestSubMap
- Overrides:
bulkTestSubMapin classAbstractTestSortedMap
-
getSampleKeys
Description copied from class:AbstractTestMapReturns the set of keys in the mappings used to test the map. This method must return an array with the same length asAbstractTestMap.getSampleValues()and all array elements must be different. The default implementation constructs a set of String keys, and includes a single null key ifAbstractTestMap.isAllowNullKey()returnstrue.- Overrides:
getSampleKeysin classAbstractTestMap
-
getSampleValues
Description copied from class:AbstractTestMapReturns the set of values in the mappings used to test the map. This method must return an array with the same length asAbstractTestMap.getSampleKeys(). The default implementation constructs a set of String values and includes a single null value ifAbstractTestMap.isAllowNullValue()returnstrue, and includes two values that are the same ifAbstractTestMap.isAllowDuplicateValues()returnstrue.- Overrides:
getSampleValuesin classAbstractTestMap
-
getNewSampleValues
Description copied from class:AbstractTestMapReturns a the set of values that can be used to replace the values returned fromAbstractTestMap.getSampleValues(). This method must return an array with the same length asAbstractTestMap.getSampleValues(). The values returned from this method should not be the same as those returned fromAbstractTestMap.getSampleValues(). The default implementation constructs a set of String values and includes a single null value ifAbstractTestMap.isAllowNullValue()returnstrue, and includes two values that are the same ifAbstractTestMap.isAllowDuplicateValues()returnstrue.- Overrides:
getNewSampleValuesin classAbstractTestMap
-
isAllowNullKey
public boolean isAllowNullKey()Description copied from class:AbstractTestSortedMapCan't sort null keys.- Overrides:
isAllowNullKeyin classAbstractTestSortedMap- Returns:
- false
-
isAllowNullValue
public boolean isAllowNullValue()Description copied from class:AbstractTestMapReturns true if the maps produced byAbstractTestMap.makeEmptyMap()andAbstractTestMap.makeFullMap()supports null values.Default implementation returns true. Override if your collection class does not support null values.
- Overrides:
isAllowNullValuein classAbstractTestMap
-
isPutAddSupported
public boolean isPutAddSupported()Description copied from class:AbstractTestMapReturns true if the maps produced byAbstractTestMap.makeEmptyMap()andAbstractTestMap.makeFullMap()support theputandputAlloperations adding new mappings.Default implementation returns true. Override if your collection class does not support put adding.
- Overrides:
isPutAddSupportedin classAbstractTestMap
-
isPutChangeSupported
public boolean isPutChangeSupported()Description copied from class:AbstractTestMapReturns true if the maps produced byAbstractTestMap.makeEmptyMap()andAbstractTestMap.makeFullMap()support theputandputAlloperations changing existing mappings.Default implementation returns true. Override if your collection class does not support put changing.
- Overrides:
isPutChangeSupportedin classAbstractTestMap
-
isRemoveSupported
public boolean isRemoveSupported()Description copied from class:AbstractTestMapReturns true if the maps produced byAbstractTestMap.makeEmptyMap()andAbstractTestMap.makeFullMap()support theremoveandclearoperations.Default implementation returns true. Override if your collection class does not support removal operations.
- Overrides:
isRemoveSupportedin classAbstractTestMap
-
isTestSerialization
public boolean isTestSerialization()Description copied from class:AbstractTestObjectIs serialization testing supported. Default is true.- Overrides:
isTestSerializationin classAbstractTestObject
-