Interface CollectionTests.RemoveAllTests<T>
-
- Type Parameters:
T
- The element type of the collection to test.
- All Superinterfaces:
CollectionTests<T>
,IterableTests<T>
- All Known Subinterfaces:
MapTests.EntrySetTests.RemoveAllTests<K,V>
,MapTests.KeySetTests.RemoveAllTests<K,V>
,MapTests.ValuesTests.RemoveAllTests<K,V>
- Enclosing interface:
- CollectionTests<T>
@TestInstance(PER_CLASS) @DisplayName("removeAll(Collection)") public static interface CollectionTests.RemoveAllTests<T> extends CollectionTests<T>
Contains tests forCollection.removeAll(Collection)
.By default, the tests in this interface assume that calling
Collection.removeAll(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 withRemoveNullNotSupported
and/orRemoveIncompatibleNotSupported
.- 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
testRemoveAll(Collection<?> c, boolean expected)
default void
testRemoveAllWithCollectionWithIncompatibleObject(TestInfo testInfo)
default void
testRemoveAllWithCollectionWithNull(TestInfo testInfo)
default void
testRemoveAllWithNullCollection()
-
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
-
testRemoveAll
@ParameterizedTest(name="{0}: {1}") @ArgumentsSource(RemoveAllArgumentsProvider.class) @DisplayName("removeAll(Collection)") default void testRemoveAll(Collection<?> c, boolean expected)
-
testRemoveAllWithNullCollection
@Test @DisplayName("removeAll(Collection) with a null collection") default void testRemoveAllWithNullCollection()
-
testRemoveAllWithCollectionWithNull
@Test @DisplayName("removeAll(Collection) with a collection with a null") default void testRemoveAllWithCollectionWithNull(TestInfo testInfo)
-
testRemoveAllWithCollectionWithIncompatibleObject
@Test @DisplayName("removeAll(Collection) with a collection with an incompatible object") default void testRemoveAllWithCollectionWithIncompatibleObject(TestInfo testInfo)
-
-