Keel 2.1RC2

org.apache.commons.collections
Class TestBag

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.collections.BulkTest
              extended byorg.apache.commons.collections.TestObject
                  extended byorg.apache.commons.collections.TestBag
All Implemented Interfaces:
java.lang.Cloneable, junit.framework.Test
Direct Known Subclasses:
TestHashBag, TestTreeBag

public abstract class TestBag
extends TestObject

Tests base 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.

Version:
$Id: TestBag.java,v 1.5 2002/10/12 22:36:21 scolebourne Exp $
Author:
Chuck Burdick

Field Summary
 
Fields inherited from class org.apache.commons.collections.TestObject
COLLECTIONS_MAJOR_VERSION
 
Fields inherited from class org.apache.commons.collections.BulkTest
verboseName
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestBag(java.lang.String testName)
           
 
Method Summary
abstract  Bag makeBag()
          Return a new, empty Bag to used for testing.
 java.lang.Object makeObject()
          Return a new, empty Object to used for testing.
 void testBagAdd()
           
 void testBagEqualsSelf()
           
 void testContains()
           
 void testIterator()
           
 void testIteratorFail()
           
 void testRemove()
           
 void testRemoveAll()
           
 void testRetainAll()
           
 void testSize()
           
 
Methods inherited from class org.apache.commons.collections.TestObject
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, getCompatibilityVersion, readExternalFormFromBytes, readExternalFormFromDisk, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, testSimpleSerialization, writeExternalFormToBytes, writeExternalFormToDisk
 
Methods inherited from class org.apache.commons.collections.BulkTest
clone, ignoredSimpleTests, makeSuite, toString
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestBag

public TestBag(java.lang.String testName)
Method Detail

makeBag

public abstract Bag makeBag()
Return a new, empty Bag to used for testing.


makeObject

public java.lang.Object makeObject()
Description copied from class: TestObject
Return a new, empty Object to used for testing.

Specified by:
makeObject in class TestObject

testBagAdd

public void testBagAdd()

testBagEqualsSelf

public void testBagEqualsSelf()

testRemove

public void testRemove()

testRemoveAll

public void testRemoveAll()

testContains

public void testContains()

testSize

public void testSize()

testRetainAll

public void testRetainAll()

testIterator

public void testIterator()

testIteratorFail

public void testIteratorFail()

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.