org.apache.commons.collections.bag
public abstract class AbstractTestBag extends AbstractTestObject
To use, simply extend this class, and implement the {@link #makeBag} method.
If your bag fails one of these tests by design, you may still use this base set of cases. Simply override the test case (method) your bag fails.
Constructor Summary | |
---|---|
AbstractTestBag(String testName)
JUnit constructor.
|
Method Summary | |
---|---|
abstract Bag | makeBag()
Return a new, empty bag to used for testing.
|
Object | makeObject()
Implements the superclass method to return the Bag.
|
void | testBagAdd() |
void | testBagEqualsSelf() |
void | testContains() |
void | testContainsAll() |
void | testEmptyBagCompatibility()
Compare the current serialized form of the Bag
against the canonical version in CVS. |
void | testEmptyBagSerialization() |
void | testEquals() |
void | testEqualsHashBag() |
void | testFullBagCompatibility()
Compare the current serialized form of the Bag
against the canonical version in CVS. |
void | testFullBagSerialization() |
void | testHashCode() |
void | testIterator() |
void | testIteratorFail() |
void | testIteratorFailDoubleRemove() |
void | testIteratorFailNoMore() |
void | testRemove() |
void | testRemoveAll() |
void | testRetainAll() |
void | testSize() |
void | testToArray() |
void | testToArrayPopulate() |
Parameters: testName the test class name
Returns: the bag to be tested
Returns: the bag to be tested