org.apache.commons.collections.iterators
public abstract class AbstractTestListIterator extends AbstractTestIterator
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.
Since: Commons Collections 3.0
Constructor Summary | |
---|---|
AbstractTestListIterator(String testName)
JUnit constructor.
|
Method Summary | |
---|---|
Object | addSetValue()
The value to be used in the add and set tests.
|
Iterator | makeEmptyIterator()
Implements the abstract superclass method to return the list iterator.
|
abstract ListIterator | makeEmptyListIterator()
Implement this method to return a list iterator over an empty collection.
|
Iterator | makeFullIterator()
Implements the abstract superclass method to return the list iterator.
|
abstract 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. |
Parameters: testName the test class name
Returns: an empty iterator
Returns: an empty iterator
Returns: a full iterator
Returns: a full iterator
Returns: true if Iterator supports add
Returns: true if Iterator supports set