T
- The element type of the iterator to test.public interface IteratorTests<T>
Iterator
functionalities.Modifier and Type | Interface and Description |
---|---|
static interface |
IteratorTests.ForEachRemainingTests<T>
Contains tests for
Iterator.forEachRemaining(Consumer) . |
static interface |
IteratorTests.IterationTests<T>
Contains tests for
Iterator.hasNext() and Iterator.next() . |
static interface |
IteratorTests.RemoveTests<T>
Contains tests for
Iterator.remove() . |
Modifier and Type | Method and Description |
---|---|
Collection<T> |
expectedElements()
Returns the expected elements returned by the iterator to test.
|
boolean |
fixedOrder()
Returns whether or not the iterator to test has a fixed order.
|
Iterable<T> |
iterable()
Returns an iterable that returns iterators to test.
|
Iterable<T> iterable()
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.
Collection<T> expectedElements()
boolean fixedOrder()
true
if the iterator to test has a fixed order, or false
if the order is unspecified.Copyright © 2020–2023. All rights reserved.