Interface MapTests.RemoveExactValueTests<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>
@TestInstance(PER_CLASS) @DisplayName("remove(Object, Object)") public static interface MapTests.RemoveExactValueTests<K,V> extends MapTests<K,V>
Contains tests forMap.remove(Object, Object)
.By default, the tests in this interface assume that calling
Map.remove(Object, Object)
with a key or value that isnull
or an instance of an incompatible type will simply returnfalse
. If any of these is not the case, annotate your class withRemoveNullKeyNotSupported
,RemoveNullNotSupported
,RemoveIncompatibleKeyNotSupported
and/orRemoveIncompatibleNotSupported
.- Author:
- Rob Spoor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.MapTests
MapTests.ClearTests<K,V>, MapTests.ComputeIfAbsentTests<K,V>, MapTests.ComputeIfPresentTests<K,V>, MapTests.ComputeTests<K,V>, MapTests.ContainsKeyTests<K,V>, MapTests.ContainsValueTests<K,V>, MapTests.EntrySetTests<K,V>, MapTests.EqualsArgumentsProvider, MapTests.EqualsTests<K,V>, MapTests.ForEachTests<K,V>, MapTests.GetOrDefaultTests<K,V>, MapTests.GetTests<K,V>, MapTests.HashCodeTests<K,V>, MapTests.KeySetTests<K,V>, MapTests.MergeTests<K,V>, MapTests.PutAllTests<K,V>, MapTests.PutIfAbsentTests<K,V>, MapTests.PutTests<K,V>, MapTests.RemoveArgumentsProvider, MapTests.RemoveExactValueArgumentsProvider, MapTests.RemoveExactValueTests<K,V>, MapTests.RemoveTests<K,V>, MapTests.ReplaceAllTests<K,V>, MapTests.ReplaceExactValueTests<K,V>, MapTests.ReplaceTests<K,V>, MapTests.ValuesTests<K,V>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
testRemoveExactValue(Object key, Object value, boolean expected)
default void
testRemoveExactValueWithIncompatibleKey(TestInfo testInfo)
default void
testRemoveExactValueWithIncompatibleValue(TestInfo testInfo)
default void
testRemoveExactValueWithNullKey(TestInfo testInfo)
default void
testRemoveExactValueWithNullValue(TestInfo testInfo)
-
Methods inherited from interface com.github.robtimus.junit.support.test.collections.MapTests
expectedEntries, map, nonContainedEntries
-
-
-
-
Method Detail
-
testRemoveExactValue
@ParameterizedTest(name="{0}, {1}: {2}") @ArgumentsSource(RemoveExactValueArgumentsProvider.class) @DisplayName("remove(Object, Object)") default void testRemoveExactValue(Object key, Object value, boolean expected)
-
testRemoveExactValueWithNullKey
@Test @DisplayName("remove(Object, Object) with null key") default void testRemoveExactValueWithNullKey(TestInfo testInfo)
-
testRemoveExactValueWithIncompatibleKey
@Test @DisplayName("remove(Object, Object) with incompatible key") default void testRemoveExactValueWithIncompatibleKey(TestInfo testInfo)
-
testRemoveExactValueWithNullValue
@Test @DisplayName("remove(Object, Object) with null value") default void testRemoveExactValueWithNullValue(TestInfo testInfo)
-
testRemoveExactValueWithIncompatibleValue
@Test @DisplayName("remove(Object, Object) with incompatible value") default void testRemoveExactValueWithIncompatibleValue(TestInfo testInfo)
-
-