Interface SetContract<E,L extends List<E>>

Type Parameters:
E - The element type for the list being tested.
L - The type of the list being tested.
All Superinterfaces:
CollectionContractConfig, CollectionContractSupport<E,L>, CollectionProviderSupport<E,L>, ContractSupport<L>, ElementProviderSupport<E>, ProviderSupport<L>, SupportedMethods
All Known Subinterfaces:
ListContract<E,L>

public interface SetContract<E,L extends List<E>> extends CollectionContractSupport<E,L>
This interface tests if a list class has implemented the set method correctly.
Since:
1.0
Author:
evanbergstrom
See Also:
  • Method Details

    • testSet

      @Test @DisplayName("Test that the set method works") default void testSet()
      Tests that the set method works.
      Throws:
      org.opentest4j.AssertionFailedError - if the test fails.
    • testSetWithEmptyCollection

      @Test @DisplayName("Test that the set method works on an empty list") default void testSetWithEmptyCollection()
      Tests that the set method works on an empty list.
      Throws:
      org.opentest4j.AssertionFailedError - if the test fails.
    • testSetThrowsForInvalidIndex

      @Test @DisplayName("Test that the set method throws for invalid index") default void testSetThrowsForInvalidIndex()
      Tests that the set method throws for an invalid index.
      Throws:
      org.opentest4j.AssertionFailedError - if the test fails.
    • testSetWithNullElement

      @Test @DisplayName("Test that the set method works with a null element") default void testSetWithNullElement()
      Tests that the set method works with a null element.
      Throws:
      org.opentest4j.AssertionFailedError - if the test fails.