|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.collections.BulkTest
org.apache.commons.collections.AbstractTestObject
org.apache.commons.collections.bag.AbstractTestBag
public abstract class AbstractTestBag
Abstract test class for Bag
methods and contracts.
To use, simply extend this class, and implement
the 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.
Field Summary |
---|
Fields inherited from class org.apache.commons.collections.AbstractTestObject |
---|
COLLECTIONS_MAJOR_VERSION |
Constructor Summary | |
---|---|
AbstractTestBag(java.lang.String testName)
JUnit constructor. |
Method Summary | |
---|---|
abstract Bag |
makeBag()
Return a new, empty bag to used for testing. |
java.lang.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 |
testIteratorRemoveProtectsInvariants()
|
void |
testRemove()
|
void |
testRemoveAll()
|
void |
testRetainAll()
|
void |
testSize()
|
void |
testToArray()
|
void |
testToArrayPopulate()
|
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 |
---|
public AbstractTestBag(java.lang.String testName)
testName
- the test class nameMethod Detail |
---|
public abstract Bag makeBag()
public java.lang.Object makeObject()
makeObject
in class AbstractTestObject
public void testBagAdd()
public void testBagEqualsSelf()
public void testRemove()
public void testRemoveAll()
public void testContains()
public void testContainsAll()
public void testSize()
public void testRetainAll()
public void testIterator()
public void testIteratorFail()
public void testIteratorFailNoMore()
public void testIteratorFailDoubleRemove()
public void testIteratorRemoveProtectsInvariants()
public void testToArray()
public void testToArrayPopulate()
public void testEquals()
public void testEqualsHashBag()
public void testHashCode()
public void testEmptyBagSerialization() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void testFullBagSerialization() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void testEmptyBagCompatibility() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void testFullBagCompatibility() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |