Class CollectionContractTest
java.lang.Object
org.soliscode.test.contract.ContractTest<Integer,BreakableCollection<Integer>>
org.soliscode.test.contract.CollectionContractTest
@DisplayName("Tests for CollectionContract class")
public class CollectionContractTest
extends ContractTest<Integer,BreakableCollection<Integer>>
Tests for the CollectionContract class.
- Since:
- 1.0
- Author:
- evanbergstrom
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Dynamically created instance ofIterableContract
that will run on instances ofBreakableIterator
with a specified break. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull CollectionContractTest.DynamicBrokenCollectionContract
createTest
(@NotNull Break b) Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the add(Object) method that should fail for various breaks.Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the addAll(Collection) method that should fail for various breaks.Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the clear() method that should fail for various breaks.Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the contains(Object) method that should fail for various breaks.Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the contains(Object) method that should fail for various breaks.Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the isEmpty() method that should fail for various breaks.Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the remove(Object) method that should fail for various breaks.Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the removeAll(Collection) method that should fail for various breaks.Collection
<org.junit.jupiter.api.DynamicTest> Test factory for tests of the removeIf() method that should fail for various breaks.Methods inherited from class org.soliscode.test.contract.ContractTest
failingTest
-
Constructor Details
-
CollectionContractTest
public CollectionContractTest()
-
-
Method Details
-
createTest
@NotNull protected @NotNull CollectionContractTest.DynamicBrokenCollectionContract createTest(@NotNull @NotNull Break b) - Specified by:
createTest
in classContractTest<Integer,
BreakableCollection<Integer>>
-
dynamicTestsForAdd
Test factory for tests of the add(Object) method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the add(Object) method.
-
dynamicTestsForAddAll
Test factory for tests of the addAll(Collection) method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the addAll(Collection) method.
-
dynamicTestsForClear
Test factory for tests of the clear() method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the clear() method.
-
dynamicTestsForContains
Test factory for tests of the contains(Object) method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the contains(Object) method.
-
dynamicTestsForContainsAll
Test factory for tests of the contains(Object) method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the contains(Object) method.
-
dynamicTestsForIsEmpty
Test factory for tests of the isEmpty() method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the isEmpty() method.
-
dynamicTestsForRemove
Test factory for tests of the remove(Object) method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the remove(Object) method.
-
dynamicTestsForRemoveAll
@TestFactory @Disabled public Collection<org.junit.jupiter.api.DynamicTest> dynamicTestsForRemoveAll()Test factory for tests of the removeAll(Collection) method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the removeAll(Collection) method.
-
dynamicTestsForRemoveIf
@TestFactory @Disabled public Collection<org.junit.jupiter.api.DynamicTest> dynamicTestsForRemoveIf()Test factory for tests of the removeIf() method that should fail for various breaks.- Returns:
- a collection of dynamic tests of the removeIf() method.
-