Package com.java.pojo.api.assertion
Class AbstractAssertion
- java.lang.Object
-
- com.java.pojo.api.assertion.AbstractAssertion
-
public abstract class AbstractAssertion extends Object
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 Constructor Description AbstractAssertion()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
areWellImplemented()
Performs specified tests on classes using declared field value changer.AbstractAssertion
create(Class<?> clazz, ConstructorParameters constructorParameters)
Indicates, that class should be constructed using given constructor parameters.AbstractAssertion
create(Class<?> clazz, Object[] constructorParameters, Class<?>[] constructorParameterTypes)
Indicates, that class should be constructed using given constructor parameters.AbstractAssertion
create(String qualifiedClassName, ConstructorParameters constructorParameters)
Indicates, that class should be constructed using given constructor parameters.AbstractAssertion
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)
AbstractAssertion
quickly()
Specifies generation of O(N) test objects for N fields.protected abstract void
runAssertions()
AbstractAssertion
testing(Method method)
Specifies what test will be performed.AbstractAssertion
testing(Method... methods)
Specifies what tests will be performed.AbstractAssertion
thoroughly()
Specifies generation of O(2^N) test objects for N fields.AbstractAssertion
using(AbstractFieldValueChanger abstractFieldValueChanger)
Specifies what field values changer will be used for testing.
-
-
-
Method Detail
-
using
public AbstractAssertion using(AbstractFieldValueChanger abstractFieldValueChanger)
Specifies what field values changer will be used for testing.- Parameters:
abstractFieldValueChanger
- field values changer- Returns:
- itself
- See Also:
AbstractFieldValueChanger
-
thoroughly
public AbstractAssertion thoroughly()
Specifies generation of O(2^N) test objects for N fields.- Returns:
- itself
-
quickly
public AbstractAssertion quickly()
Specifies generation of O(N) test objects for N fields.- Returns:
- itself
-
testing
public AbstractAssertion testing(Method... methods)
Specifies what tests will be performed.- Parameters:
methods
- methods to test- Returns:
- itself
- See Also:
Method
-
testing
public AbstractAssertion testing(Method method)
Specifies what test will be performed.- Parameters:
method
- method to test- Returns:
- itself
- See Also:
Method
-
areWellImplemented
public void areWellImplemented()
Performs specified tests on classes using declared field value changer.- See Also:
Method
,AbstractFieldValueChanger
-
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:
ConstructorParameters
-
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:
ConstructorParameters
-
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:
ConstructorParameters
-
create
public AbstractAssertion create(Class<?> clazz, ConstructorParameters constructorParameters)
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:
ConstructorParameters
-
runAssertions
protected abstract void runAssertions()
-
logTestersAndClasses
protected void logTestersAndClasses(org.slf4j.Logger logger, ClassAndFieldPredicatePair... classAndFieldPredicatePairs)
-
-