org.apache.commons.collections.map
Class AbstractTestMap.TestMapEntrySet

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.collections.BulkTest
              extended byorg.apache.commons.collections.AbstractTestObject
                  extended byorg.apache.commons.collections.collection.AbstractTestCollection
                      extended byorg.apache.commons.collections.set.AbstractTestSet
                          extended byorg.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
AbstractTestMap.TestMapEntrySet()
           
 
Method Summary
 java.util.Map.Entry getEntry(java.util.Iterator itConfirmed, java.lang.Object key)
           
 java.lang.Object[] getFullElements()
          Returns an array of objects that are contained in a collection produced by AbstractTestSet.makeFullCollection().
 java.lang.Object[] getOtherElements()
          Returns an array of elements that are not contained in a full collection.
 boolean isAddSupported()
          Returns true if the collections produced by AbstractTestSet.makeCollection() and AbstractTestSet.makeFullCollection() support the add and addAll operations.
 boolean isGetStructuralModify()
           
 boolean isRemoveSupported()
          Returns true if the collections produced by AbstractTestSet.makeCollection() and AbstractTestSet.makeFullCollection() support the remove, removeAll, retainAll, clear and iterator().remove() methods.
 boolean isTestSerialization()
          Is serialization testing supported.
 java.util.Set makeEmptySet()
          Makes an empty set.
 java.util.Set makeFullSet()
          Makes a full set by first creating an empty set and then adding all the elements returned by getFullElements().
 void resetEmpty()
          Resets the AbstractTestCollection.collection and AbstractTestMap.confirmed fields to empty collections.
 void resetFull()
          Resets the AbstractTestCollection.collection and AbstractTestMap.confirmed fields to full collections.
 void testMapEntrySetIteratorEntry()
           
 void testMapEntrySetIteratorEntrySetValue()
           
 void testMapEntrySetRemoveNonMapEntry()
           
 void verify()
          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
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown
 
Methods inherited from class junit.framework.Assert
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, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractTestMap.TestMapEntrySet

public AbstractTestMap.TestMapEntrySet()
Method Detail

getFullElements

public java.lang.Object[] getFullElements()
Description copied from class: AbstractTestCollection
Returns an array of objects that are contained in a collection produced by AbstractTestCollection.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:
getFullElements in class AbstractTestCollection

getOtherElements

public java.lang.Object[] getOtherElements()
Description copied from class: AbstractTestCollection
Returns 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 by AbstractTestCollection.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:
getOtherElements in class AbstractTestCollection

makeEmptySet

public java.util.Set makeEmptySet()
Description copied from class: AbstractTestSet
Makes an empty set. The returned set should have no elements.

Specified by:
makeEmptySet in class AbstractTestSet
Returns:
an empty set

makeFullSet

public java.util.Set makeFullSet()
Description copied from class: AbstractTestSet
Makes a full set by first creating an empty set and then adding all the elements returned by AbstractTestCollection.getFullElements(). Override if your set does not support the add operation.

Overrides:
makeFullSet in class AbstractTestSet
Returns:
a full set

isAddSupported

public boolean isAddSupported()
Description copied from class: AbstractTestCollection
Returns true if the collections produced by AbstractTestCollection.makeCollection() and AbstractTestCollection.makeFullCollection() support the add and addAll operations.

Default implementation returns true. Override if your collection class does not support add or addAll.

Overrides:
isAddSupported in class AbstractTestCollection

isRemoveSupported

public boolean isRemoveSupported()
Description copied from class: AbstractTestCollection
Returns true if the collections produced by AbstractTestCollection.makeCollection() and AbstractTestCollection.makeFullCollection() support the remove, removeAll, retainAll, clear and iterator().remove() methods. Default implementation returns true. Override if your collection class does not support removal operations.

Overrides:
isRemoveSupported in class AbstractTestCollection

isGetStructuralModify

public boolean isGetStructuralModify()

isTestSerialization

public boolean isTestSerialization()
Description copied from class: AbstractTestObject
Is serialization testing supported. Default is true.

Overrides:
isTestSerialization in class AbstractTestObject

resetFull

public void resetFull()
Description copied from class: AbstractTestCollection
Resets the AbstractTestCollection.collection and AbstractTestCollection.confirmed fields to full collections. Invoke this method before performing a modification test.

Overrides:
resetFull in class AbstractTestCollection

resetEmpty

public void resetEmpty()
Description copied from class: AbstractTestCollection
Resets the AbstractTestCollection.collection and AbstractTestCollection.confirmed fields to empty collections. Invoke this method before performing a modification test.

Overrides:
resetEmpty in class AbstractTestCollection

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: AbstractTestSet
Provides additional verifications for sets.

Overrides:
verify in class AbstractTestSet


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.