Package com.java.pojo.api.assertion
Class AbstractAssertion
java.lang.Object
com.java.pojo.api.assertion.AbstractAssertion
This is abstract class for all assertion classes.
For more documentation, please refer POJO-TESTER User Guide documentation
- Since:
- 0.1.0
- Author:
- Piotr JoĊski
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Performs specified tests on classes using declared field value changer.create
(Class<?> clazz, ConstructorParameters constructorParameters) Indicates, that class should be constructed using given constructor parameters.Indicates, that class should be constructed using given constructor parameters.create
(String qualifiedClassName, ConstructorParameters constructorParameters) Indicates, that class should be constructed using given constructor parameters.create
(String qualifiedClassName, Object[] constructorParameters, Class<?>[] constructorParameterTypes) Indicates, that class should be constructed using given constructor parameters.protected void
logTestersAndClasses
(org.slf4j.Logger logger, ClassAndFieldPredicatePair... classAndFieldPredicatePairs) quickly()
Specifies generation of O(N) test objects for N fields.protected abstract void
Specifies what test will be performed.Specifies what tests will be performed.Specifies generation of O(2^N) test objects for N fields.using
(AbstractFieldValueChanger abstractFieldValueChanger) Specifies what field values changer will be used for testing.
-
Constructor Details
-
AbstractAssertion
public AbstractAssertion()
-
-
Method Details
-
using
Specifies what field values changer will be used for testing.- Parameters:
abstractFieldValueChanger
- field values changer- Returns:
- itself
- See Also:
-
thoroughly
Specifies generation of O(2^N) test objects for N fields.- Returns:
- itself
-
quickly
Specifies generation of O(N) test objects for N fields.- Returns:
- itself
-
testing
Specifies what tests will be performed.- Parameters:
methods
- methods to test- Returns:
- itself
- See Also:
-
testing
Specifies what test will be performed.- Parameters:
method
- method to test- Returns:
- itself
- See Also:
-
areWellImplemented
public void areWellImplemented()Performs specified tests on classes using declared field value changer.- See Also:
-
create
public AbstractAssertion create(String qualifiedClassName, Object[] constructorParameters, Class<?>[] constructorParameterTypes) Indicates, that class should be constructed using given constructor parameters. Constructor will be selected based on constructor parameter's types.- Parameters:
qualifiedClassName
- class to instantiateconstructorParameters
- constructor parametersconstructorParameterTypes
- constructor parameter's types- Returns:
- itself
- See Also:
-
create
public AbstractAssertion create(String qualifiedClassName, ConstructorParameters constructorParameters) Indicates, that class should be constructed using given constructor parameters. Constructor will be selected based on constructor parameter's types.- Parameters:
qualifiedClassName
- class to instantiateconstructorParameters
- constructor parameters- Returns:
- itself
- See Also:
-
create
public AbstractAssertion create(Class<?> clazz, Object[] constructorParameters, Class<?>[] constructorParameterTypes) Indicates, that class should be constructed using given constructor parameters. Constructor will be selected based on constructor parameter's types.- Parameters:
clazz
- class to instantiateconstructorParameters
- constructor parametersconstructorParameterTypes
- constructor parameter's types- Returns:
- itself
- See Also:
-
create
Indicates, that class should be constructed using given constructor parameters. Constructor will be selected based on constructor parameter's types.- Parameters:
clazz
- class to instantiateconstructorParameters
- constructor parameters- Returns:
- itself
- See Also:
-
runAssertions
protected abstract void runAssertions() -
logTestersAndClasses
protected void logTestersAndClasses(org.slf4j.Logger logger, ClassAndFieldPredicatePair... classAndFieldPredicatePairs)
-