| org.apache.commons.collections.collection.AbstractTestCollection org.apache.commons.collections.set.AbstractTestSet
All known Subclasses: org.apache.commons.collections.set.TestCompositeSet, org.apache.commons.collections.set.TestMapBackedSet2, org.apache.commons.collections.set.TestListOrderedSet2, org.apache.commons.collections.set.TestTypedSet, org.apache.commons.collections.set.TestListOrderedSet, org.apache.commons.collections.set.TestUnmodifiableSet, org.apache.commons.collections.set.TestSynchronizedSet, org.apache.commons.collections.set.TestTransformedSet, org.apache.commons.collections.set.AbstractTestSortedSet, org.apache.commons.collections.set.TestMapBackedSet, org.apache.commons.collections.set.TestPredicatedSet,
AbstractTestSet | abstract public class AbstractTestSet extends AbstractTestCollection (Code) | | Abstract test class for
Set methods and contracts.
Since
Set doesn't stipulate much new behavior that isn't already
found in
Collection , this class basically just adds tests for
Set.equals and
Set.hashCode along with an updated
AbstractTestSet.verify() that ensures elements do not appear more than once in the
set.
To use, subclass and override the
AbstractTestSet.makeEmptySet() method. You may have to override other protected methods if your
set is not modifiable, or if your set restricts what kinds of
elements may be added; see
AbstractTestCollection for more details.
since: Commons Collections 3.0 version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $ author: Paul Jack |
AbstractTestSet | public AbstractTestSet(String name)(Code) | | JUnit constructor.
Parameters: name - name for test |
isEqualsCheckable | public boolean isEqualsCheckable()(Code) | | Set equals method is defined.
|
makeConfirmedCollection | public Collection makeConfirmedCollection()(Code) | | Returns an empty Set for use in modification testing.
a confirmed empty collection |
makeConfirmedFullCollection | public Collection makeConfirmedFullCollection()(Code) | | Returns a full Set for use in modification testing.
a confirmed full collection |
makeEmptySet | abstract public Set makeEmptySet()(Code) | | Makes an empty set. The returned set should have no elements.
an empty set |
makeFullSet | public Set makeFullSet()(Code) | | Makes a full set by first creating an empty set and then adding
all the elements returned by
AbstractTestSet.getFullElements() .
Override if your set does not support the add operation.
a full set |
verify | public void verify()(Code) | | Provides additional verifications for sets.
|
|
|