Interface MapTests<K,​V>

    • Method Detail

      • map

        Map<K,​V> map()
        Returns the map to test. This should be populated, i.e. not empty, unless the map can only be empty.

        This method will be called only once for each test. This makes it possible to initialize the map in a method annotated with BeforeEach, and perform additional tests after the pre-defined test has finished.

        Returns:
        The map to test.
      • expectedEntries

        Map<K,​V> expectedEntries()
        Returns a map with the expected entries contained by the map to test. This should not be of the same type as the map to test, but preferably of some well-known map type like HashMap.
        Returns:
        A map with the expected entries contained by the map to test.
      • nonContainedEntries

        Map<K,​V> nonContainedEntries()
        Returns some entries that should not be contained by the map to test. For both Map.keySet() and Map.values(), the returned map should have no common elements with expectedEntries().
        Returns:
        A map with entries that should not be contained by the entries to test.