Interface MapTests.ValuesTests.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<V>
,CollectionTests.RetainAllTests<V>
,IterableTests<V>
,MapTests<K,V>
,MapTests.ValuesTests<K,V>
- Enclosing interface:
- MapTests.ValuesTests<K,V>
@TestInstance(PER_CLASS) @DisplayName("retainAll(Collection)") public static interface MapTests.ValuesTests.RetainAllTests<K,V> extends MapTests.ValuesTests<K,V>, CollectionTests.RetainAllTests<V>
Contains tests forCollection.retainAll(Collection)
for values collections.By default, the tests in this interface assume that calling
Collection.retainAll(Collection)
with a collection containingnull
or an instance of an incompatible type will simply ignore thenull
and incompatible element. If either is not the case, annotate your class withContainsNullNotSupported
and/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.EqualsTests<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.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.ValuesTests
MapTests.ValuesTests.AddAllTests<K,V>, MapTests.ValuesTests.AddTests<K,V>, MapTests.ValuesTests.ClearTests<K,V>, MapTests.ValuesTests.ContainsAllTests<K,V>, MapTests.ValuesTests.ContainsTests<K,V>, MapTests.ValuesTests.ForEachTests<K,V>, MapTests.ValuesTests.IteratorTests<K,V>, MapTests.ValuesTests.RemoveAllTests<K,V>, MapTests.ValuesTests.RemoveIfTests<K,V>, MapTests.ValuesTests.RemoveTests<K,V>, MapTests.ValuesTests.RetainAllTests<K,V>, MapTests.ValuesTests.ToArrayTests<K,V>, MapTests.ValuesTests.ToArrayWithGeneratorTests<K,V>, MapTests.ValuesTests.ToObjectArrayTests<K,V>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
testRetainAll(Collection<?> c, boolean expected)
default void
testRetainAllWithCollectionWithIncompatibleObject(TestInfo testInfo)
default void
testRetainAllWithCollectionWithNull(TestInfo testInfo)
default void
testRetainAllWithNullCollection()
-
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.ValuesTests
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:
testRetainAll
in interfaceCollectionTests.RetainAllTests<K>
-
testRetainAllWithNullCollection
@Test @DisplayName("retainAll(Collection) with a null collection") default void testRetainAllWithNullCollection()
- Specified by:
testRetainAllWithNullCollection
in interfaceCollectionTests.RetainAllTests<K>
-
testRetainAllWithCollectionWithNull
@Test @DisplayName("retainAll(Collection) with a collection with a null") default void testRetainAllWithCollectionWithNull(TestInfo testInfo)
- Specified by:
testRetainAllWithCollectionWithNull
in interfaceCollectionTests.RetainAllTests<K>
-
testRetainAllWithCollectionWithIncompatibleObject
@Test @DisplayName("retainAll(Collection) with a collection with an incompatible object") default void testRetainAllWithCollectionWithIncompatibleObject(TestInfo testInfo)
- Specified by:
testRetainAllWithCollectionWithIncompatibleObject
in interfaceCollectionTests.RetainAllTests<K>
-
-