Interface IteratorTests<T>
-
- Type Parameters:
T- The element type of the iterator to test.
- All Known Subinterfaces:
IteratorTests.ForEachRemainingTests<T>,IteratorTests.IterationTests<T>,IteratorTests.RemoveTests<T>,ListIteratorTests<T>,ListIteratorTests.AddTests<T>,ListIteratorTests.IterationTests<T>,ListIteratorTests.RemoveTests<T>,ListIteratorTests.SetTests<T>,MapTests.EntrySetTests.IteratorTests<K,V>,MapTests.EntrySetTests.IteratorTests.ForEachRemainingTests<K,V>,MapTests.EntrySetTests.IteratorTests.IterationTests<K,V>,MapTests.EntrySetTests.IteratorTests.RemoveTests<K,V>,MapTests.KeySetTests.IteratorTests<K,V>,MapTests.KeySetTests.IteratorTests.ForEachRemainingTests<K,V>,MapTests.KeySetTests.IteratorTests.IterationTests<K,V>,MapTests.KeySetTests.IteratorTests.RemoveTests<K,V>,MapTests.ValuesTests.IteratorTests<K,V>,MapTests.ValuesTests.IteratorTests.ForEachRemainingTests<K,V>,MapTests.ValuesTests.IteratorTests.IterationTests<K,V>,MapTests.ValuesTests.IteratorTests.RemoveTests<K,V>,UnmodifiableIteratorTests<T>,UnmodifiableIteratorTests.RemoveTests<T>,UnmodifiableListIteratorTests<T>,UnmodifiableListIteratorTests.AddTests<T>,UnmodifiableListIteratorTests.RemoveTests<T>,UnmodifiableListIteratorTests.SetTests<T>,UnmodifiableMapTests.EntrySetTests.IteratorTests<K,V>,UnmodifiableMapTests.EntrySetTests.IteratorTests.ForEachRemainingTests<K,V>,UnmodifiableMapTests.EntrySetTests.IteratorTests.IterationTests<K,V>,UnmodifiableMapTests.EntrySetTests.IteratorTests.RemoveTests<K,V>,UnmodifiableMapTests.KeySetTests.IteratorTests<K,V>,UnmodifiableMapTests.KeySetTests.IteratorTests.ForEachRemainingTests<K,V>,UnmodifiableMapTests.KeySetTests.IteratorTests.IterationTests<K,V>,UnmodifiableMapTests.KeySetTests.IteratorTests.RemoveTests<K,V>,UnmodifiableMapTests.ValuesTests.IteratorTests<K,V>,UnmodifiableMapTests.ValuesTests.IteratorTests.ForEachRemainingTests<K,V>,UnmodifiableMapTests.ValuesTests.IteratorTests.IterationTests<K,V>,UnmodifiableMapTests.ValuesTests.IteratorTests.RemoveTests<K,V>
public interface IteratorTests<T>Base interface for testing separateIteratorfunctionalities.- Author:
- Rob Spoor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIteratorTests.ForEachRemainingTests<T>Contains tests forIterator.forEachRemaining(Consumer).static interfaceIteratorTests.IterationTests<T>Contains tests forIterator.hasNext()andIterator.next().static interfaceIteratorTests.RemoveTests<T>Contains tests forIterator.remove().
-
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.booleanfixedOrder()Returns whether or not the iterator to test has a fixed order.Iterable<T>iterable()Returns an iterable that returns iterators to test.
-
-
-
Method Detail
-
iterable
Iterable<T> iterable()
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.- Returns:
- An iterable that returns iterators 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:
trueif the iterator to test has a fixed order, orfalseif the order is unspecified.
-
-