Class AbstractTestMap.TestMapEntrySet
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.commons.collections.BulkTest
-
- org.apache.commons.collections.AbstractTestObject
-
- org.apache.commons.collections.collection.AbstractTestCollection
-
- org.apache.commons.collections.set.AbstractTestSet
-
- org.apache.commons.collections.map.AbstractTestMap.TestMapEntrySet
-
- All Implemented Interfaces:
java.lang.Cloneable,junit.framework.Test
- Direct Known Subclasses:
AbstractTestBidiMap.TestBidiMapEntrySet
- Enclosing class:
- AbstractTestMap
public class AbstractTestMap.TestMapEntrySet extends AbstractTestSet
-
-
Field Summary
-
Fields inherited from class org.apache.commons.collections.collection.AbstractTestCollection
collection, confirmed
-
Fields inherited from class org.apache.commons.collections.AbstractTestObject
COLLECTIONS_MAJOR_VERSION
-
-
Constructor Summary
Constructors Constructor Description TestMapEntrySet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map.EntrygetEntry(java.util.Iterator itConfirmed, java.lang.Object key)java.lang.Object[]getFullElements()Returns an array of objects that are contained in a collection produced byAbstractTestCollection.makeFullCollection().java.lang.Object[]getOtherElements()Returns an array of elements that are not contained in a full collection.booleanisAddSupported()Returns true if the collections produced byAbstractTestCollection.makeCollection()andAbstractTestCollection.makeFullCollection()support theaddandaddAlloperations.booleanisGetStructuralModify()booleanisRemoveSupported()Returns true if the collections produced byAbstractTestCollection.makeCollection()andAbstractTestCollection.makeFullCollection()support theremove,removeAll,retainAll,clearanditerator().remove()methods.booleanisTestSerialization()Is serialization testing supported.java.util.SetmakeEmptySet()Makes an empty set.java.util.SetmakeFullSet()Makes a full set by first creating an empty set and then adding all the elements returned byAbstractTestCollection.getFullElements().voidresetEmpty()Resets theAbstractTestCollection.collectionandAbstractTestCollection.confirmedfields to empty collections.voidresetFull()Resets theAbstractTestCollection.collectionandAbstractTestCollection.confirmedfields to full collections.voidtestMapEntrySetIteratorEntry()voidtestMapEntrySetIteratorEntrySetValue()voidtestMapEntrySetRemoveNonMapEntry()voidverify()Provides additional verifications for sets.-
Methods inherited from class org.apache.commons.collections.set.AbstractTestSet
getConfirmedSet, getSet, isEqualsCheckable, makeCollection, makeConfirmedCollection, makeConfirmedFullCollection, makeFullCollection, testSetEquals, testSetHashCode
-
Methods inherited from class org.apache.commons.collections.collection.AbstractTestCollection
areEqualElementsDistinguishable, cloneMapEntry, getFullNonNullElements, getFullNonNullStringElements, getOtherNonNullElements, getOtherNonNullStringElements, isFailFastSupported, isNullSupported, makeObject, testCollectionAdd, testCollectionAddAll, testCollectionClear, testCollectionContains, testCollectionContainsAll, testCollectionIsEmpty, testCollectionIterator, testCollectionIteratorFailFast, testCollectionIteratorRemove, testCollectionRemove, testCollectionRemoveAll, testCollectionRetainAll, testCollectionSize, testCollectionToArray, testCollectionToArray2, testCollectionToString, testSerializeDeserializeThenCompare, testUnsupportedAdd, testUnsupportedRemove
-
Methods inherited from class org.apache.commons.collections.AbstractTestObject
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, getCompatibilityVersion, readExternalFormFromBytes, readExternalFormFromDisk, skipSerializedCanonicalTests, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testEqualsNull, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, 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, tearDown
-
-
-
-
Method Detail
-
getFullElements
public java.lang.Object[] getFullElements()
Description copied from class:AbstractTestCollectionReturns an array of objects that are contained in a collection produced byAbstractTestCollection.makeFullCollection(). Every element in the returned array must be an element in a full collection.The default implementation returns a heterogenous array of objects with some duplicates. null is added if allowed. Override if you require specific testing elements. Note that if you override
AbstractTestCollection.makeFullCollection(), you must override this method to reflect the contents of a full collection.- Overrides:
getFullElementsin classAbstractTestCollection
-
getOtherElements
public java.lang.Object[] getOtherElements()
Description copied from class:AbstractTestCollectionReturns an array of elements that are not contained in a full collection. Every element in the returned array must not exist in a collection returned byAbstractTestCollection.makeFullCollection(). The default implementation returns a heterogenous array of elements without null. Note that some of the tests add these elements to an empty or full collection, so if your collection restricts certain kinds of elements, you should override this method.- Overrides:
getOtherElementsin classAbstractTestCollection
-
makeEmptySet
public java.util.Set makeEmptySet()
Description copied from class:AbstractTestSetMakes an empty set. The returned set should have no elements.- Specified by:
makeEmptySetin classAbstractTestSet- Returns:
- an empty set
-
makeFullSet
public java.util.Set makeFullSet()
Description copied from class:AbstractTestSetMakes a full set by first creating an empty set and then adding all the elements returned byAbstractTestCollection.getFullElements(). Override if your set does not support the add operation.- Overrides:
makeFullSetin classAbstractTestSet- Returns:
- a full set
-
isAddSupported
public boolean isAddSupported()
Description copied from class:AbstractTestCollectionReturns true if the collections produced byAbstractTestCollection.makeCollection()andAbstractTestCollection.makeFullCollection()support theaddandaddAlloperations.Default implementation returns true. Override if your collection class does not support add or addAll.
- Overrides:
isAddSupportedin classAbstractTestCollection
-
isRemoveSupported
public boolean isRemoveSupported()
Description copied from class:AbstractTestCollectionReturns true if the collections produced byAbstractTestCollection.makeCollection()andAbstractTestCollection.makeFullCollection()support theremove,removeAll,retainAll,clearanditerator().remove()methods. Default implementation returns true. Override if your collection class does not support removal operations.- Overrides:
isRemoveSupportedin classAbstractTestCollection
-
isGetStructuralModify
public boolean isGetStructuralModify()
-
isTestSerialization
public boolean isTestSerialization()
Description copied from class:AbstractTestObjectIs serialization testing supported. Default is true.- Overrides:
isTestSerializationin classAbstractTestObject
-
resetFull
public void resetFull()
Description copied from class:AbstractTestCollectionResets theAbstractTestCollection.collectionandAbstractTestCollection.confirmedfields to full collections. Invoke this method before performing a modification test.- Overrides:
resetFullin classAbstractTestCollection
-
resetEmpty
public void resetEmpty()
Description copied from class:AbstractTestCollectionResets theAbstractTestCollection.collectionandAbstractTestCollection.confirmedfields to empty collections. Invoke this method before performing a modification test.- Overrides:
resetEmptyin classAbstractTestCollection
-
testMapEntrySetIteratorEntry
public void testMapEntrySetIteratorEntry()
-
testMapEntrySetIteratorEntrySetValue
public void testMapEntrySetIteratorEntrySetValue()
-
getEntry
public java.util.Map.Entry getEntry(java.util.Iterator itConfirmed, java.lang.Object key)
-
testMapEntrySetRemoveNonMapEntry
public void testMapEntrySetRemoveNonMapEntry()
-
verify
public void verify()
Description copied from class:AbstractTestSetProvides additional verifications for sets.- Overrides:
verifyin classAbstractTestSet
-
-