Interface CollectionTests.RemoveTests<T>
-
- Type Parameters:
T
- The element type of the collection to test.
- All Superinterfaces:
CollectionTests<T>
,IterableTests<T>
- All Known Subinterfaces:
MapTests.EntrySetTests.RemoveTests<K,V>
,MapTests.KeySetTests.RemoveTests<K,V>
,MapTests.ValuesTests.RemoveTests<K,V>
- Enclosing interface:
- CollectionTests<T>
@TestInstance(PER_CLASS) @DisplayName("remove(Object)") public static interface CollectionTests.RemoveTests<T> extends CollectionTests<T>
Contains tests forCollection.remove(Object)
.By default, the tests in this interface assume that calling
Collection.remove(Object)
withnull
or an instance of an incompatible type will simply returnfalse
. 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
testRemove(Object o, boolean expected)
default void
testRemoveIncompatibleObject(TestInfo testInfo)
default void
testRemoveNull(TestInfo testInfo)
-
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
-
testRemove
@ParameterizedTest(name="{0}: {1}") @ArgumentsSource(RemoveArgumentsProvider.class) @DisplayName("remove(Object)") default void testRemove(Object o, boolean expected)
-
testRemoveNull
@Test @DisplayName("remove(Object) with null") default void testRemoveNull(TestInfo testInfo)
-
testRemoveIncompatibleObject
@Test @DisplayName("remove(Object) with incompatible object") default void testRemoveIncompatibleObject(TestInfo testInfo)
-
-