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

Type Parameters:
E - The element type being tested.
L - The list type 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 GetContract<E,L extends List<E>> extends CollectionContractSupport<E,L>
This interface tests if a list class has implemented the get method correctly.
Since:
1.0
Author:
evanbergstrom
See Also:
  • Method Details

    • testGet

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

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

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