Class CopyConstructorContractImpl<T>
java.lang.Object
de.cuioss.test.valueobjects.contract.CopyConstructorContractImpl<T>
- Type Parameters:
T
- identifying the of objects to be tested.
- All Implemented Interfaces:
TestContract<T>
TestContract for dealing Constructor and factories,
VerifyConstructor
and VerifyFactoryMethod
respectively- Author:
- Oliver Wolff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks the concrete contract.static final <T> Optional<CopyConstructorContractImpl<T>>
createTestContract
(Class<T> beanType, Class<?> annotated, List<PropertyMetadata> initialPropertyMetadata, List<TestContract<T>> existingContracts) Factory method for creating a anCopyConstructorContractImpl
depending on the given parameterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.cuioss.test.valueobjects.api.TestContract
getInstantiator
-
Constructor Details
-
CopyConstructorContractImpl
public CopyConstructorContractImpl()
-
-
Method Details
-
assertContract
Description copied from interface:TestContract
Checks the concrete contract.- Specified by:
assertContract
in interfaceTestContract<T>
-
createTestContract
public static final <T> Optional<CopyConstructorContractImpl<T>> createTestContract(Class<T> beanType, Class<?> annotated, List<PropertyMetadata> initialPropertyMetadata, List<TestContract<T>> existingContracts) Factory method for creating a anCopyConstructorContractImpl
depending on the given parameter- Parameters:
beanType
- identifying the type to be tested. Must not be nullannotated
- the annotated unit-test-class. It is expected to be annotated withVerifyCopyConstructor
method will returnOptional.empty()
initialPropertyMetadata
- identifying the complete set ofPropertyMetadata
, where the actualPropertyMetadata
for the test will be filtered by using the attributes defined withinVerifyCopyConstructor
. Must not be null.existingContracts
- identifying the already configured contracts. Must not be null nor empty.- Returns:
- an
Optional
ofCopyConstructorContractImpl
in case all requirements for the parameters are correct, otherwise it will returnOptional.empty()
-