Interface SpliteratorTests<T>
-
- Type Parameters:
T
- The element type of the spliterator to test.
- All Known Subinterfaces:
SpliteratorTests.ForEachRemainingTests<T>
,SpliteratorTests.TryAdvanceTests<T>
public interface SpliteratorTests<T>
Base interface for testing separateSpliterator
functionalities.- Author:
- Rob Spoor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SpliteratorTests.ForEachRemainingTests<T>
Contains tests forSpliterator.forEachRemaining(Consumer)
.static interface
SpliteratorTests.TryAdvanceTests<T>
Contains tests forSpliterator.tryAdvance(Consumer)
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 spliterators to test.
-
-
-
Method Detail
-
iterable
Iterable<T> iterable()
Returns an iterable that returns spliterators 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.- Returns:
- An iterable that returns spliterators to test.
-
expectedElements
Collection<T> expectedElements()
Returns the expected elements returned by the iterator to test.- Returns:
- The expected elements returned by the iterator to test.
-
fixedOrder
boolean fixedOrder()
Returns whether or not the iterator to test has a fixed order.- Returns:
true
if the iterator to test has a fixed order, orfalse
if the order is unspecified.
-
-