Interface ListTests<T>

    • 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 interface CollectionTests<T>
        Specified by:
        iterable in interface IterableTests<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 like ArrayList or HashSet.
        Specified by:
        expectedElements in interface IterableTests<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 returns true.
        Specified by:
        fixedOrder in interface IterableTests<T>
        Returns:
        true if the iterable to test has a fixed order, or false if the order is unspecified.