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 separateEnumerationfunctionalities.- Author:
- Rob Spoor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceEnumerationTests.AsIteratorTests<T>Contains tests forEnumeration.asIterator().static interfaceEnumerationTests.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.booleanfixedOrder()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:
trueif the enumeration to test has a fixed order, orfalseif the order is unspecified.
-
-