Interface MapTests.KeySetTests<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<K>
,IterableTests<K>
,MapTests<K,V>
,SetTests<K>
- All Known Subinterfaces:
MapTests.KeySetTests.AddAllTests<K,V>
,MapTests.KeySetTests.AddTests<K,V>
,MapTests.KeySetTests.ClearTests<K,V>
,MapTests.KeySetTests.ContainsAllTests<K,V>
,MapTests.KeySetTests.ContainsTests<K,V>
,MapTests.KeySetTests.EqualsTests<K,V>
,MapTests.KeySetTests.ForEachTests<K,V>
,MapTests.KeySetTests.HashCodeTests<K,V>
,MapTests.KeySetTests.IteratorTests<K,V>
,MapTests.KeySetTests.IteratorTests.ForEachRemainingTests<K,V>
,MapTests.KeySetTests.IteratorTests.IterationTests<K,V>
,MapTests.KeySetTests.IteratorTests.RemoveTests<K,V>
,MapTests.KeySetTests.RemoveAllTests<K,V>
,MapTests.KeySetTests.RemoveIfTests<K,V>
,MapTests.KeySetTests.RemoveTests<K,V>
,MapTests.KeySetTests.RetainAllTests<K,V>
,MapTests.KeySetTests.SpliteratorTests<K,V>
,MapTests.KeySetTests.ToArrayTests<K,V>
,MapTests.KeySetTests.ToArrayWithGeneratorTests<K,V>
,MapTests.KeySetTests.ToObjectArrayTests<K,V>
@DisplayName("keySet()") public static interface MapTests.KeySetTests<K,V> extends MapTests<K,V>, SetTests<K>
Contains tests forMap.keySet()
.- Author:
- Rob Spoor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MapTests.KeySetTests.AddAllTests<K,V>
Contains tests forSet.addAll(Collection)
for key sets.static interface
MapTests.KeySetTests.AddTests<K,V>
Contains tests forSet.add(Object)
for key sets.static interface
MapTests.KeySetTests.ClearTests<K,V>
Contains tests forSet.clear()
for key sets.static interface
MapTests.KeySetTests.ContainsAllTests<K,V>
Contains tests forSet.containsAll(Collection)
for key sets.static interface
MapTests.KeySetTests.ContainsTests<K,V>
Contains tests forSet.contains(Object)
for key sets.static interface
MapTests.KeySetTests.EqualsTests<K,V>
Contains tests forSet.equals(Object)
for key sets.static interface
MapTests.KeySetTests.ForEachTests<K,V>
Contains tests forIterable.forEach(Consumer)
for key sets.static interface
MapTests.KeySetTests.HashCodeTests<K,V>
Contains tests forSet.hashCode()
for key sets.static interface
MapTests.KeySetTests.IteratorTests<K,V>
Contains tests forSet.iterator()
for key sets.static interface
MapTests.KeySetTests.RemoveAllTests<K,V>
Contains tests forSet.removeAll(Collection)
for key sets.static interface
MapTests.KeySetTests.RemoveIfTests<K,V>
Contains tests forCollection.removeIf(Predicate)
for key sets.static interface
MapTests.KeySetTests.RemoveTests<K,V>
Contains tests forSet.remove(Object)
for key sets.static interface
MapTests.KeySetTests.RetainAllTests<K,V>
Contains tests forSet.retainAll(Collection)
for key sets.static interface
MapTests.KeySetTests.SpliteratorTests<K,V>
Contains tests forSet.spliterator()
for key sets.static interface
MapTests.KeySetTests.ToArrayTests<K,V>
Contains tests forSet.toArray(Object[])
for key sets.static interface
MapTests.KeySetTests.ToArrayWithGeneratorTests<K,V>
Contains tests forCollection.toArray(IntFunction)
for key sets.static interface
MapTests.KeySetTests.ToObjectArrayTests<K,V>
Contains tests forSet.toArray()
for key sets.-
Nested classes/interfaces inherited from interface com.github.robtimus.junit.support.test.collections.CollectionTests
CollectionTests.RemoveAllArgumentsProvider, CollectionTests.RemoveArgumentsProvider, CollectionTests.RetainAllArgumentsProvider
-
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.GetOrDefaultTests<K,V>, MapTests.GetTests<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.SetTests
SetTests.AddAllArgumentsProvider, SetTests.AddArgumentsProvider, SetTests.EqualsArgumentsProvider
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Collection<K>
expectedElements()
Returns the expected elements contained by the iterable to test.default Set<K>
iterable()
Returns the iterable to test.default Collection<K>
nonContainedElements()
Returns some elements that should not be contained by the collection to test.-
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
-
-
-
-
Method Detail
-
iterable
default Set<K> iterable()
Description copied from interface:IterableTests
Returns the iterable to test. This should be populated, i.e. not empty, unless the iterable can only be empty.This method will be called only once for each test. This makes it possible to initialize the iterable in a method annotated with
BeforeEach
, and perform additional tests after the pre-defined test has finished.- Specified by:
iterable
in interfaceCollectionTests<K>
- Specified by:
iterable
in interfaceIterableTests<K>
- Specified by:
iterable
in interfaceSetTests<K>
- Returns:
- The iterable to test.
-
expectedElements
default Collection<K> expectedElements()
Description copied from interface:IterableTests
Returns the expected elements contained by the iterable to test. This should not be of the same type as the iterable to test, but preferably of some well-known iterable type likeArrayList
orHashSet
.- Specified by:
expectedElements
in interfaceIterableTests<K>
- Returns:
- The expected elements contained by the iterable to test.
-
nonContainedElements
default Collection<K> nonContainedElements()
Description copied from interface:CollectionTests
Returns some elements that should not be contained by the collection to test.- Specified by:
nonContainedElements
in interfaceCollectionTests<K>
- Returns:
- A collection with elements that should not be contained by the collection to test.
-
-