Interface AddContract<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> ListAddContract<E,
,L> ListContract<E,
,L> SequencedCollectionContract<E,
C>
This interface tests if a collection class has implemented the add 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
-
testAdd
@DisplayName("Test that the add method works") @Test default void testAdd()Tests that the add method works. -
testAddWithNullValue
@DisplayName("Test that the add method works with null element values") @Test default void testAddWithNullValue()Tests that the add method handles null values correctly. -
addWithDuplicateValue
@DisplayName("Test that the add method works with duplicate element values") @Test default void addWithDuplicateValue()Tests that the add method handles duplicate values correctly.
-