Interface ListTests<T>
-
- Type Parameters:
T
- The element type of the list to test.
- All Superinterfaces:
CollectionTests<T>
,IterableTests<T>
- All Known Subinterfaces:
ListTests.AddAllIndexedTests<T>
,ListTests.AddAllTests<T>
,ListTests.AddIndexedTests<T>
,ListTests.AddTests<T>
,ListTests.EqualsTests<T>
,ListTests.GetTests<T>
,ListTests.HashCodeTests<T>
,ListTests.IndexOfTests<T>
,ListTests.LastIndexOfTests<T>
,ListTests.ListIteratorIndexedTests<T>
,ListTests.RemoveIndexedTests<T>
,ListTests.ReplaceAllTests<T>
,ListTests.SetTests<T>
,ListTests.SpliteratorTests<T>
,ListTests.SubListTests<T>
,UnmodifiableListTests<T>
,UnmodifiableListTests.AddAllIndexedTests<T>
,UnmodifiableListTests.AddIndexedTests<T>
,UnmodifiableListTests.RemoveIndexedTests<T>
,UnmodifiableListTests.ReplaceAllTests<T>
,UnmodifiableListTests.SetTests<T>
public interface ListTests<T> extends CollectionTests<T>
Base interface for testing separateList
functionalities.- Author:
- Rob Spoor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.CollectionTests
CollectionTests.ClearTests<T>, CollectionTests.ContainsAllTests<T>, CollectionTests.ContainsTests<T>, CollectionTests.RemoveAllArgumentsProvider, CollectionTests.RemoveAllTests<T>, CollectionTests.RemoveArgumentsProvider, CollectionTests.RemoveIfTests<T>, CollectionTests.RemoveTests<T>, CollectionTests.RetainAllArgumentsProvider, CollectionTests.RetainAllTests<T>, CollectionTests.ToArrayTests<T>, CollectionTests.ToArrayWithGeneratorTests<T>, CollectionTests.ToObjectArrayTests<T>
-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.IterableTests
IterableTests.ForEachTests<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<T>
expectedElements()
Returns the expected elements contained by the iterable to test.default boolean
fixedOrder()
Returns whether or not the iterable to test has a fixed order.List<T>
iterable()
Returns the iterable to test.-
Methods inherited from interface com.github.robtimus.junit.support.test.collections.CollectionTests
nonContainedElements
-
-
-
-
Method Detail
-
iterable
List<T> iterable()
Description copied from interface:IterableTests
Returns the iterable to test. This should be populated, i.e. not empty, unless the iterable can only be empty.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.- Specified by:
iterable
in interfaceCollectionTests<T>
- Specified by:
iterable
in interfaceIterableTests<T>
- Returns:
- The iterable to test.
-
expectedElements
List<T> expectedElements()
Description copied from interface:IterableTests
Returns the expected elements contained by the iterable to test. This should not be of the same type as the iterable to test, but preferably of some well-known iterable type likeArrayList
orHashSet
.- Specified by:
expectedElements
in interfaceIterableTests<T>
- Returns:
- The expected elements contained by the iterable to test.
-
fixedOrder
default boolean fixedOrder()
Returns whether or not the iterable to test has a fixed order. Always returnstrue
.- Specified by:
fixedOrder
in interfaceIterableTests<T>
- Returns:
true
if the iterable to test has a fixed order, orfalse
if the order is unspecified.
-
-