Interface IndexOfContract<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 IndexOfContract<E,L extends List<E>> extends CollectionContractSupport<E,L>
This interface tests if a list class has implemented the indexOf method correctly.
Since:
1.0
Author:
evanbergstrom
See Also:
  • Method Details

    • testIndexOf

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

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

      @Test @DisplayName("Test that the indexOf method works with an incompatible type") default void testIndexOfWithIncompatibleType()
      Tests that the indexOf method with an incompatible type.
      Throws:
      org.opentest4j.AssertionFailedError - if the test fails.
    • testIndexOfWithNullValue

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