Interface MapTests.EntrySetTests.RetainAllTests<K,V>
-
- Type Parameters:
K- The key type of the map to test.V- The value type of the map to test.
- All Superinterfaces:
CollectionTests<Map.Entry<K,V>>,CollectionTests.RetainAllTests<Map.Entry<K,V>>,IterableTests<Map.Entry<K,V>>,MapTests<K,V>,MapTests.EntrySetTests<K,V>,SetTests<Map.Entry<K,V>>
- Enclosing interface:
- MapTests.EntrySetTests<K,V>
@TestInstance(PER_CLASS) @DisplayName("retainAll(Collection)") public static interface MapTests.EntrySetTests.RetainAllTests<K,V> extends MapTests.EntrySetTests<K,V>, CollectionTests.RetainAllTests<Map.Entry<K,V>>
Contains tests forSet.retainAll(Collection)for entry sets.By default, the tests in this interface assume that calling
Set.retainAll(Collection)with a collection containingnullor an instance of an incompatible type will simply ignore thenulland incompatible element. If either is not the case, annotate your class withContainsNullNotSupportedand/orContainsIncompatibleNotSupported- Author:
- Rob Spoor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.CollectionTests
CollectionTests.ClearTests<T>, CollectionTests.ContainsAllTests<T>, CollectionTests.ContainsTests<T>, CollectionTests.RemoveAllArgumentsProvider, CollectionTests.RemoveAllTests<T>, CollectionTests.RemoveArgumentsProvider, CollectionTests.RemoveIfTests<T>, CollectionTests.RemoveTests<T>, CollectionTests.RetainAllArgumentsProvider, CollectionTests.RetainAllTests<T>, CollectionTests.ToArrayTests<T>, CollectionTests.ToArrayWithGeneratorTests<T>, CollectionTests.ToObjectArrayTests<T>
-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.IterableTests
IterableTests.ForEachTests<T>
-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.MapTests
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.GetOrDefaultTests<K,V>, MapTests.GetTests<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.ReplaceAllTests<K,V>, MapTests.ReplaceExactValueTests<K,V>, MapTests.ReplaceTests<K,V>, MapTests.ValuesTests<K,V>
-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.MapTests.EntrySetTests
MapTests.EntrySetTests.AddAllTests<K,V>, MapTests.EntrySetTests.AddTests<K,V>, MapTests.EntrySetTests.ClearTests<K,V>, MapTests.EntrySetTests.ContainsAllTests<K,V>, MapTests.EntrySetTests.ContainsTests<K,V>, MapTests.EntrySetTests.EqualsTests<K,V>, MapTests.EntrySetTests.ForEachTests<K,V>, MapTests.EntrySetTests.HashCodeTests<K,V>, MapTests.EntrySetTests.IteratorTests<K,V>, MapTests.EntrySetTests.RemoveAllTests<K,V>, MapTests.EntrySetTests.RemoveIfTests<K,V>, MapTests.EntrySetTests.RemoveTests<K,V>, MapTests.EntrySetTests.RetainAllTests<K,V>, MapTests.EntrySetTests.SpliteratorTests<K,V>, MapTests.EntrySetTests.ToArrayTests<K,V>, MapTests.EntrySetTests.ToArrayWithGeneratorTests<K,V>, MapTests.EntrySetTests.ToObjectArrayTests<K,V>
-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.SetTests
SetTests.AddAllArgumentsProvider, SetTests.AddArgumentsProvider, SetTests.EqualsArgumentsProvider
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidtestRetainAll(Collection<?> c, boolean expected)default voidtestRetainAllWithCollectionWithIncompatibleObject(TestInfo testInfo)default voidtestRetainAllWithCollectionWithNull(TestInfo testInfo)default voidtestRetainAllWithNullCollection()-
Methods inherited from interface com.github.robtimus.junit.support.test.collections.IterableTests
fixedOrder
-
Methods inherited from interface com.github.robtimus.junit.support.test.collections.MapTests
expectedEntries, map, nonContainedEntries
-
Methods inherited from interface com.github.robtimus.junit.support.test.collections.MapTests.EntrySetTests
expectedElements, iterable, nonContainedElements
-
-
-
-
Method Detail
-
testRetainAll
@ParameterizedTest(name="{0}: {1}") @ArgumentsSource(RetainAllArgumentsProvider.class) @DisplayName("retainAll(Collection)") default void testRetainAll(Collection<?> c, boolean expected)
- Specified by:
testRetainAllin interfaceCollectionTests.RetainAllTests<K>
-
testRetainAllWithNullCollection
@Test @DisplayName("retainAll(Collection) with a null collection") default void testRetainAllWithNullCollection()
- Specified by:
testRetainAllWithNullCollectionin interfaceCollectionTests.RetainAllTests<K>
-
testRetainAllWithCollectionWithNull
@Test @DisplayName("retainAll(Collection) with a collection with a null") default void testRetainAllWithCollectionWithNull(TestInfo testInfo)
- Specified by:
testRetainAllWithCollectionWithNullin interfaceCollectionTests.RetainAllTests<K>
-
testRetainAllWithCollectionWithIncompatibleObject
@Test @DisplayName("retainAll(Collection) with a collection with an incompatible object") default void testRetainAllWithCollectionWithIncompatibleObject(TestInfo testInfo)
- Specified by:
testRetainAllWithCollectionWithIncompatibleObjectin interfaceCollectionTests.RetainAllTests<K>
-
-