Interface IsEmptyContract<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 IsEmptyContract<E,C extends Collection<E>> extends CollectionContractSupport<E,C>
This interface tests if a collection class has implemented the isEmpty method correctly.
Since:
1.0
Author:
evanbergstrom
See Also:
  • Method Details

    • testIsEmptyForEmptyCollection

      @Test @DisplayName("Test isEmpty returns true for an empty collection") default void testIsEmptyForEmptyCollection()
      Tests that the isEmpty method returns true for an empty collection.
    • testIsEmptyForNonEmptyCollection

      @Test @DisplayName("Test isEmpty returns false for a collection with elements") default void testIsEmptyForNonEmptyCollection()
      Tests that the isEmpty method returns false for a collection with at least one element.