Interface IterableTests<T>

    • Method Detail

      • iterable

        Iterable<T> iterable()
        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.

        Returns:
        The iterable to test.
      • expectedElements

        Collection<T> expectedElements()
        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.
        Returns:
        The expected elements contained by the iterable to test.
      • fixedOrder

        boolean fixedOrder()
        Returns whether or not the iterable to test has a fixed order.
        Returns:
        true if the iterable to test has a fixed order, or false if the order is unspecified.