Class ReplaceAssertBuilder<S,​D,​RD,​RS>

  • Type Parameters:
    S - The source type
    D - The destination type
    RS - The type of the source field
    RD - The type of the destination field

    public class ReplaceAssertBuilder<S,​D,​RD,​RS>
    extends Object
    Builder to assert a replace operation on a Mapper object using AssertConfiguration.
    Author:
    schuettec
    • Method Detail

      • withPropertyPath

        public <E extends ExceptionAssertConfiguration<S,​D> withPropertyPath​(com.remondis.propertypath.api.PropertyPath<RD,​RS,​E> propertyPath)
        Expects the mapping to evaluate the exact property path that was specified.
        Parameters:
        propertyPath - The expected property path.
        Returns:
        Returns the AssertConfiguration for further configuration.
      • withPropertyPathAndTransformation

        public AssertConfiguration<S,​D> withPropertyPathAndTransformation​(com.remondis.propertypath.api.PropertyPath<?,​RS,​?> propertyPath)
        Expects the mapping to evaluate the exact property path that was specified.
        Parameters:
        propertyPath - The expected property path.
        Returns:
        Returns the AssertConfiguration for further configuration.
      • andTest

        public AssertConfiguration<S,​D> andTest​(Function<RS,​RD> transformation)
        Expects the mapping to not skip the transform function on null input. The specified transform function will be checked against null input.

        Note: This method cannot reliably check that the specified function is actually the function that was configured on the mapping. This method only verifies the skip-on-null behaviour and performs a null check on the specified function.

        Parameters:
        transformation - The transformation to test.
        Returns:
        Returns the AssertConfiguration for further configuration.
      • andSkipWhenNull

        public AssertConfiguration<S,​D> andSkipWhenNull()
        Expects the mapping to skip the transform function on null input.
        Returns:
        Returns the AssertConfiguration for further configuration.