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>
This interface tests if a list class has implemented the set method correctly.
- Since:
- 1.0
- Author:
- evanbergstrom
- See Also:
-
Field Summary
Fields inherited from interface org.soliscode.test.contract.support.CollectionContractSupport
DEFAULT_SIZE
-
Method Summary
Methods inherited from interface org.soliscode.test.contract.CollectionContractConfig
permitDuplicates, permitIncompatibleTypes, permitNulls
Methods inherited from interface org.soliscode.test.contract.support.CollectionProviderSupport
provider
Methods inherited from interface org.soliscode.test.contract.support.ElementProviderSupport
elementProvider
Methods inherited from interface org.soliscode.test.SupportedMethods
supportsMethod
-
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.
-