Interface CollectionTests.RetainAllTests<T>
-
- Type Parameters:
T
- The element type of the collection to test.
- All Superinterfaces:
CollectionTests<T>
,IterableTests<T>
- All Known Subinterfaces:
MapTests.EntrySetTests.RetainAllTests<K,V>
,MapTests.KeySetTests.RetainAllTests<K,V>
,MapTests.ValuesTests.RetainAllTests<K,V>
- Enclosing interface:
- CollectionTests<T>
@TestInstance(PER_CLASS) @DisplayName("retainAll(Collection)") public static interface CollectionTests.RetainAllTests<T> extends CollectionTests<T>
Contains tests forCollection.retainAll(Collection)
.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>
-
-
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.CollectionTests
iterable, nonContainedElements
-
Methods inherited from interface com.github.robtimus.junit.support.test.collections.IterableTests
expectedElements, fixedOrder
-
-
-
-
Method Detail
-
testRetainAll
@ParameterizedTest(name="{0}: {1}") @ArgumentsSource(RetainAllArgumentsProvider.class) @DisplayName("retainAll(Collection)") default void testRetainAll(Collection<?> c, boolean expected)
-
testRetainAllWithNullCollection
@Test @DisplayName("retainAll(Collection) with a null collection") default void testRetainAllWithNullCollection()
-
testRetainAllWithCollectionWithNull
@Test @DisplayName("retainAll(Collection) with a collection with a null") default void testRetainAllWithCollectionWithNull(TestInfo testInfo)
-
testRetainAllWithCollectionWithIncompatibleObject
@Test @DisplayName("retainAll(Collection) with a collection with an incompatible object") default void testRetainAllWithCollectionWithIncompatibleObject(TestInfo testInfo)
-
-