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

    • testRemoveOnEmptyContainer

      @Test @DisplayName("The remove method can be called on an empty container") default void testRemoveOnEmptyContainer()
      Tests that the remove method works on an empty container.
    • testRemoveOnContainerWithElements

      @Test @DisplayName("The remove method works on a container with elements") default void testRemoveOnContainerWithElements()
      Tests that the remove method works on a container with elements. #Implementation Note There is no guarantee of the order that the elements are added to the collection, but in case they are stored in the same order they are added, this test will remove elements that are added first, added lsat, and added in the middle.
    • testRemoveOnContainerWithNulls

      @Test @DisplayName("The remove method works with null elements") default void testRemoveOnContainerWithNulls()
      Tests that the remove method works with null elements.
    • testRemoveOnIncompatibleObject

      @Test @DisplayName("The remove method works with incompatible types") default void testRemoveOnIncompatibleObject()
      Tests that the remove method works with incompatible objects.