Keel 2.1RC2

org.apache.commons.collections
Class TestList.BulkTestSubList

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.TestCollection
                      extended byorg.apache.commons.collections.TestList
                          extended byorg.apache.commons.collections.TestList.BulkTestSubList
All Implemented Interfaces:
java.lang.Cloneable, junit.framework.Test
Enclosing class:
TestList

static class TestList.BulkTestSubList
extends TestList


Nested Class Summary
 
Nested classes inherited from class org.apache.commons.collections.TestList
TestList.BulkTestSubList
 
Field Summary
private  TestList outer
           
 
Fields inherited from class org.apache.commons.collections.TestCollection
collection, confirmed
 
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
(package private) TestList.BulkTestSubList(TestList outer)
           
 
Method Summary
protected  java.lang.Object[] getFullElements()
          Returns an array of objects that are contained in a collection produced by TestList.makeFullCollection().
protected  java.lang.Object[] getOtherElements()
          Returns an array of elements that are not contained in a full collection.
protected  boolean isAddSupported()
          Returns true if the collections produced by TestList.makeCollection() and TestList.makeFullCollection() support the add and addAll operations.
protected  boolean isRemoveSupported()
          Returns true if the collections produced by TestList.makeCollection() and TestList.makeFullCollection() support the remove, removeAll, retainAll, clear and iterator().remove() methods.
protected  java.util.List makeEmptyList()
          Return a new, empty List to be used for testing.
protected  java.util.List makeFullList()
          Return a new, full List to be used for testing.
protected  void resetEmpty()
          Resets the TestCollection.collection and TestCollection.confirmed fields to empty collections.
protected  void resetFull()
          Resets the TestCollection.collection and TestCollection.confirmed fields to full collections.
protected  void verify()
          Verifies that the test list implementation matches the confirmed list implementation.
 
Methods inherited from class org.apache.commons.collections.TestList
bulkTestSubList, failFastAll, failFastMethod, getConfirmedList, getList, makeCollection, makeConfirmedCollection, makeConfirmedFullCollection, makeFullCollection, testEmptyListCompatibility, testEmptyListSerialization, testFullListCompatibility, testFullListSerialization, testListAddByIndex, testListAddByIndexBoundsChecking, testListAddByIndexBoundsChecking2, testListEquals, testListGetByIndex, testListGetByIndexBoundsChecking, testListGetByIndexBoundsChecking2, testListHashCode, testListIndexOf, testListIteratorAdd, testListIteratorSet, testListLastIndexOf, testListListIterator, testListListIteratorByIndex, testListRemoveByIndex, testListRemoveByIndexBoundsChecking, testListRemoveByIndexBoundsChecking2, testListSetByIndex, testListSetByIndexBoundsChecking, testListSetByIndexBoundsChecking2, testListSubListFailFastOnAdd, testListSubListFailFastOnRemove
 
Methods inherited from class org.apache.commons.collections.TestCollection
areEqualElementsDistinguishable, getFullNonNullElements, getFullNonNullStringElements, getOtherNonNullElements, getOtherNonNullStringElements, makeObject, testCollectionAdd, testCollectionAddAll, testCollectionClear, testCollectionContains, testCollectionContainsAll, testCollectionIsEmpty, testCollectionIterator, testCollectionIteratorFailFast, testCollectionIteratorRemove, testCollectionRemove, testCollectionRemoveAll, testCollectionRetainAll, testCollectionSize, testCollectionToArray, testCollectionToArray2, testCollectionToString, testUnsupportedAdd, testUnsupportedRemove
 
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
 

Field Detail

outer

private TestList outer
Constructor Detail

TestList.BulkTestSubList

TestList.BulkTestSubList(TestList outer)
Method Detail

getFullElements

protected java.lang.Object[] getFullElements()
Description copied from class: TestCollection
Returns an array of objects that are contained in a collection produced by TestCollection.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 and with the null element. Override if you require specific testing elements. Note that if you override TestCollection.makeFullCollection(), you must override this method to reflect the contents of a full collection.

Overrides:
getFullElements in class TestCollection

getOtherElements

protected java.lang.Object[] getOtherElements()
Description copied from class: TestCollection
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 TestCollection.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 TestCollection

isAddSupported

protected boolean isAddSupported()
Description copied from class: TestCollection
Returns true if the collections produced by TestCollection.makeCollection() and TestCollection.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 TestCollection

isRemoveSupported

protected boolean isRemoveSupported()
Description copied from class: TestCollection
Returns true if the collections produced by TestCollection.makeCollection() and TestCollection.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 TestCollection

makeEmptyList

protected java.util.List makeEmptyList()
Description copied from class: TestList
Return a new, empty TestList.BulkTestSubList to be used for testing.

Specified by:
makeEmptyList in class TestList
Returns:
an empty list for testing.

makeFullList

protected java.util.List makeFullList()
Description copied from class: TestList
Return a new, full TestList.BulkTestSubList to be used for testing.

Overrides:
makeFullList in class TestList
Returns:
a full list for testing

resetEmpty

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

Overrides:
resetEmpty in class TestCollection

resetFull

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

Overrides:
resetFull in class TestCollection

verify

protected void verify()
Description copied from class: TestList
Verifies that the test list implementation matches the confirmed list implementation.

Overrides:
verify in class TestList

Keel 2.1RC2

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