Interface ListIteratorTests<T>
-
- Type Parameters:
T
- The element type of the list iterator to test.
- All Superinterfaces:
IteratorTests<T>
- All Known Subinterfaces:
ListIteratorTests.AddTests<T>
,ListIteratorTests.IterationTests<T>
,ListIteratorTests.RemoveTests<T>
,ListIteratorTests.SetTests<T>
,UnmodifiableListIteratorTests<T>
,UnmodifiableListIteratorTests.AddTests<T>
,UnmodifiableListIteratorTests.RemoveTests<T>
,UnmodifiableListIteratorTests.SetTests<T>
public interface ListIteratorTests<T> extends IteratorTests<T>
Base interface for testing separateListIterator
functionalities.- Author:
- Rob Spoor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ListIteratorTests.AddTests<T>
Contains tests forListIterator.add(Object)
.static interface
ListIteratorTests.IterationTests<T>
static interface
ListIteratorTests.RemoveTests<T>
Contains tests forListIterator.remove()
.static interface
ListIteratorTests.SetTests<T>
Contains tests forListIterator.set(Object)
.-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.IteratorTests
IteratorTests.ForEachRemainingTests<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<T>
expectedElements()
Returns the expected elements returned by the iterator to test.default boolean
fixedOrder()
Returns whether or not the iterator to test has a fixed order.List<T>
iterable()
Returns an iterable that returns iterators to test.
-
-
-
Method Detail
-
iterable
List<T> iterable()
Description copied from interface:IteratorTests
Returns an iterable that returns iterators to test.This method will be called only once for each test. This makes it possible to initialize the iterable in a method annotated with
BeforeEach
, and perform additional tests after the pre-defined test has finished.- Specified by:
iterable
in interfaceIteratorTests<T>
- Returns:
- An iterable that returns iterators to test.
-
expectedElements
List<T> expectedElements()
Description copied from interface:IteratorTests
Returns the expected elements returned by the iterator to test.- Specified by:
expectedElements
in interfaceIteratorTests<T>
- Returns:
- The expected elements returned by the iterator to test.
-
fixedOrder
default boolean fixedOrder()
Returns whether or not the iterator to test has a fixed order. Always returnstrue
.- Specified by:
fixedOrder
in interfaceIteratorTests<T>
- Returns:
true
if the iterator to test has a fixed order, orfalse
if the order is unspecified.
-
-