Interface CollectionTests.ContainsTests<T>
-
- Type Parameters:
T
- The element type of the collection to test.
- All Superinterfaces:
CollectionTests<T>
,IterableTests<T>
- All Known Subinterfaces:
MapTests.EntrySetTests.ContainsTests<K,V>
,MapTests.KeySetTests.ContainsTests<K,V>
,MapTests.ValuesTests.ContainsTests<K,V>
,UnmodifiableMapTests.EntrySetTests.ContainsTests<K,V>
,UnmodifiableMapTests.KeySetTests.ContainsTests<K,V>
,UnmodifiableMapTests.ValuesTests.ContainsTests<K,V>
- Enclosing interface:
- CollectionTests<T>
@DisplayName("contains(Object)") public static interface CollectionTests.ContainsTests<T> extends CollectionTests<T>
Contains tests forCollection.contains(Object)
.By default, the tests in this interface assume that calling
Collection.contains(Object)
withnull
or an instance of an incompatible type will simply returnfalse
. 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
testContains()
default void
testContainsWithIncompatibleObject(TestInfo testInfo)
default void
testContainsWithNull(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
-
testContains
@Test @DisplayName("contains(Object)") default void testContains()
-
testContainsWithNull
@Test @DisplayName("contains(Object) with null") default void testContainsWithNull(TestInfo testInfo)
-
testContainsWithIncompatibleObject
@Test @DisplayName("contains(Object) with an incompatible object") default void testContainsWithIncompatibleObject(TestInfo testInfo)
-
-