public abstract class AbstractTestMapIterator extends AbstractTestIterator
This class provides a framework for testing an implementation of MapIterator. Concrete subclasses must provide the list iterator to be tested. They must also specify certain details of how the list iterator operates by overriding the supportsXxx() methods if necessary.
COLLECTIONS_MAJOR_VERSION
Constructor and Description |
---|
AbstractTestMapIterator(java.lang.String testName)
JUnit constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
addSetValues()
The values to be used in the add and set tests.
|
abstract java.util.Map |
getConfirmedMap()
Implement this method to return the confirmed map which contains the same
data as the iterator.
|
abstract java.util.Map |
getMap()
Implement this method to return the map which contains the same data as the
iterator.
|
boolean |
isGetStructuralModify()
Whether the get operation on the map structurally modifies the map,
such as with LRUMap.
|
java.util.Iterator |
makeEmptyIterator()
Implements the abstract superclass method to return the list iterator.
|
abstract org.apache.commons.collections.MapIterator |
makeEmptyMapIterator()
Implement this method to return a map iterator over an empty map.
|
java.util.Iterator |
makeFullIterator()
Implements the abstract superclass method to return the list iterator.
|
abstract org.apache.commons.collections.MapIterator |
makeFullMapIterator()
Implement this method to return a map iterator over a map with elements.
|
boolean |
supportsSetValue()
Whether or not we are testing an iterator that supports setValue().
|
void |
testEmptyMapIterator()
Test that the empty list iterator contract is correct.
|
void |
testFullMapIterator()
Test that the full list iterator contract is correct.
|
void |
testMapIteratorRemoveGetKey() |
void |
testMapIteratorRemoveGetValue() |
void |
testMapIteratorSet() |
void |
testMapIteratorSetRemoveSet() |
void |
testRemove()
Test remove behaviour.
|
makeObject, supportsEmptyIterator, supportsFullIterator, supportsRemove, testEmptyIterator, testFullIterator, verify
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, getCompatibilityVersion, isEqualsCheckable, isTestSerialization, readExternalFormFromBytes, readExternalFormFromDisk, skipSerializedCanonicalTests, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testEqualsNull, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, testSerializeDeserializeThenCompare, testSimpleSerialization, writeExternalFormToBytes, writeExternalFormToDisk
clone, ignoredTests, makeSuite, toString
public AbstractTestMapIterator(java.lang.String testName)
testName
- the test class namepublic abstract org.apache.commons.collections.MapIterator makeEmptyMapIterator()
public abstract org.apache.commons.collections.MapIterator makeFullMapIterator()
public abstract java.util.Map getMap()
public abstract java.util.Map getConfirmedMap()
public final java.util.Iterator makeEmptyIterator()
makeEmptyIterator
in class AbstractTestIterator
public final java.util.Iterator makeFullIterator()
makeFullIterator
in class AbstractTestIterator
public boolean supportsSetValue()
public boolean isGetStructuralModify()
public java.lang.Object[] addSetValues()
public void testEmptyMapIterator()
public void testFullMapIterator()
public void testMapIteratorSet()
public void testRemove()
AbstractTestIterator
testRemove
in class AbstractTestIterator
public void testMapIteratorSetRemoveSet()
public void testMapIteratorRemoveGetKey()
public void testMapIteratorRemoveGetValue()
Copyright © 2001-2014 Apache Software Foundation. All Rights Reserved.