Class 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 Detail

      • AbstractAssertion

        public AbstractAssertion()
    • Method Detail

      • 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 instantiate
        constructorParameters - constructor parameters
        constructorParameterTypes - 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 instantiate
        constructorParameters - 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 instantiate
        constructorParameters - constructor parameters
        constructorParameterTypes - 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 instantiate
        constructorParameters - constructor parameters
        Returns:
        itself
        See Also:
        ConstructorParameters
      • runAssertions

        protected abstract void runAssertions()
      • logTestersAndClasses

        protected void logTestersAndClasses​(org.slf4j.Logger logger,
                                            ClassAndFieldPredicatePair... classAndFieldPredicatePairs)