Interface UnmodifiableMapTests.KeySetTests<K,​V>

    • Method Detail

      • iterable

        default Set<K> 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<K>
        Specified by:
        iterable in interface IterableTests<K>
        Specified by:
        iterable in interface SetTests<K>
        Returns:
        The iterable to test.
      • expectedElements

        default Collection<K> 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<K>
        Returns:
        The expected elements contained by the iterable to test.
      • nonContainedElements

        default Collection<K> nonContainedElements()
        Description copied from interface: CollectionTests
        Returns some elements that should not be contained by the collection to test.
        Specified by:
        nonContainedElements in interface CollectionTests<K>
        Returns:
        A collection with elements that should not be contained by the collection to test.