Interface MapTests.ReplaceTests<K,​V>

  • Type Parameters:
    K - The key type of the map to test.
    V - The value type of the map to test.
    All Superinterfaces:
    MapTests<K,​V>
    Enclosing interface:
    MapTests<K,​V>

    @DisplayName("replace(Object, Object)")
    public static interface MapTests.ReplaceTests<K,​V>
    extends MapTests<K,​V>
    Contains tests for Map.replace(Object, Object).

    By default, the tests in this interface assume that calling Map.replace(Object, Object) with a key that is null will simply return null. If this is not the case, annotate your class with StoreNullKeyNotSupported.

    The tests also assume that replacing values with null will be allowed. If this is not the case, annotate your class with StoreNullNotSupported.

    Author:
    Rob Spoor
    • Method Detail

      • testReplace

        @Test
        @DisplayName("replace(Object, Object)")
        default void testReplace()
      • testReplaceExactValueWithNullKey

        @Test
        @DisplayName("replace(Object, Object) with null key")
        default void testReplaceExactValueWithNullKey​(TestInfo testInfo)
      • testReplaceExactValueWithNullValue

        @Test
        @DisplayName("replace(Object, Object) with null value")
        default void testReplaceExactValueWithNullValue​(TestInfo testInfo)