Interface StreamContract<E,C extends Collection<E>>

Type Parameters:
E - The element type being tested.
C - The collection type being tested.
All Superinterfaces:
CollectionContractConfig, CollectionContractSupport<E,C>, CollectionProviderSupport<E,C>, ContractSupport<C>, ElementProviderSupport<E>, ProviderSupport<C>, SupportedMethods
All Known Subinterfaces:
CollectionContract<E,C>, ListContract<E,L>, SequencedCollectionContract<E,C>

public interface StreamContract<E,C extends Collection<E>> extends CollectionContractSupport<E,C>
This interface tests if a collection class has implemented the stream() method correctly and that the iterator that is returned satisfies the Stream contract.
Since:
1.0
Author:
evanbergstrom
See Also:
  • Method Details

    • testStreamForEmptyCollection

      @Test @DisplayName("The stream method can be called on an empty collection") default void testStreamForEmptyCollection()
      Tests that the stream method works for an empty collection.
    • testStreamForCollectionWithElements

      @Test @DisplayName("The stream method can be called on a collection with elements") default void testStreamForCollectionWithElements()
      Tests that the stream method works for a collection with elements.
    • testParallelStreamForEmptyCollection

      @Test @DisplayName("The parallelStream method can be called on an empty collection") default void testParallelStreamForEmptyCollection()
      Tests that the parallelStream method works for an empty collection.
    • testParallelStreamForCollectionWithElements

      @Test @DisplayName("The parallelStream method can be called on a collection with elements") default void testParallelStreamForCollectionWithElements()
      Tests that the parallelStream method works for a collection with elements.