|
|||||||||
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.iterators.AbstractTestIterator
org.apache.commons.collections.iterators.AbstractTestListIterator
public abstract class AbstractTestListIterator
Abstract class for testing the ListIterator interface.
This class provides a framework for testing an implementation of ListIterator. Concrete subclasses must provide the list iterator to be tested. They must also specify certain details of how the list iterator operates by overriding the supportsXxx() methods if necessary.
Field Summary |
---|
Fields inherited from class org.apache.commons.collections.AbstractTestObject |
---|
COLLECTIONS_MAJOR_VERSION |
Constructor Summary | |
---|---|
AbstractTestListIterator(java.lang.String testName)
JUnit constructor. |
Method Summary | |
---|---|
java.lang.Object |
addSetValue()
The value to be used in the add and set tests. |
java.util.Iterator |
makeEmptyIterator()
Implements the abstract superclass method to return the list iterator. |
abstract java.util.ListIterator |
makeEmptyListIterator()
Implement this method to return a list iterator over an empty collection. |
java.util.Iterator |
makeFullIterator()
Implements the abstract superclass method to return the list iterator. |
abstract java.util.ListIterator |
makeFullListIterator()
Implement this method to return a list iterator over a collection with elements. |
boolean |
supportsAdd()
Whether or not we are testing an iterator that supports add(). |
boolean |
supportsSet()
Whether or not we are testing an iterator that supports set(). |
void |
testAdd()
Test add behaviour. |
void |
testAddThenRemove()
Test remove after add behaviour. |
void |
testAddThenSet()
|
void |
testEmptyListIteratorIsIndeedEmpty()
Test that the empty list iterator contract is correct. |
void |
testRemoveThenSet()
|
void |
testSet()
Test set behaviour. |
void |
testWalkForwardAndBack()
Test navigation through the iterator. |
Methods inherited from class org.apache.commons.collections.iterators.AbstractTestIterator |
---|
makeObject, supportsEmptyIterator, supportsFullIterator, supportsRemove, testEmptyIterator, testFullIterator, testRemove, verify |
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 AbstractTestListIterator(java.lang.String testName)
testName
- the test class nameMethod Detail |
---|
public abstract java.util.ListIterator makeEmptyListIterator()
public abstract java.util.ListIterator makeFullListIterator()
public java.util.Iterator makeEmptyIterator()
makeEmptyIterator
in class AbstractTestIterator
public java.util.Iterator makeFullIterator()
makeFullIterator
in class AbstractTestIterator
public boolean supportsAdd()
public boolean supportsSet()
public java.lang.Object addSetValue()
public void testEmptyListIteratorIsIndeedEmpty()
public void testWalkForwardAndBack()
public void testAdd()
public void testSet()
public void testRemoveThenSet()
public void testAddThenSet()
public void testAddThenRemove()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |