Interface EnumerationTests<T>
-
- Type Parameters:
T
- The element type of the enumeration to test.
- All Known Subinterfaces:
EnumerationTests.AsIteratorTests<T>
,EnumerationTests.IterationTests<T>
public interface EnumerationTests<T>
Base interface for testing separateEnumeration
functionalities.- Author:
- Rob Spoor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
EnumerationTests.AsIteratorTests<T>
Contains tests forEnumeration.asIterator()
.static interface
EnumerationTests.IterationTests<T>
Contains tests forEnumeration.hasMoreElements()
andEnumeration.nextElement()
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Enumeration<T>
enumeration()
Returns the enumeration to test.Collection<T>
expectedElements()
Returns the expected elements returned by the enumeration to test.boolean
fixedOrder()
Returns whether or not the enumeration to test has a fixed order.
-
-
-
Method Detail
-
enumeration
Enumeration<T> enumeration()
Returns the enumeration to test.This method will be called only once for each test. This makes it possible to initialize the enumeration in a method annotated with
BeforeEach
, and perform additional tests after the pre-defined test has finished.- Returns:
- The enumeration to test.
-
expectedElements
Collection<T> expectedElements()
Returns the expected elements returned by the enumeration to test.- Returns:
- The expected elements returned by the enumeration to test.
-
fixedOrder
boolean fixedOrder()
Returns whether or not the enumeration to test has a fixed order.- Returns:
true
if the enumeration to test has a fixed order, orfalse
if the order is unspecified.
-
-