- java.lang.Object
-
- com.remondis.remap.ReplaceAssertBuilder<S,D,RD,RS>
-
- Type Parameters:
S- The source typeD- The destination typeRS- The type of the source fieldRD- The type of the destination field
public class ReplaceAssertBuilder<S,D,RD,RS> extends Object
Builder to assert a replace operation on aMapperobject usingAssertConfiguration.- Author:
- schuettec
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssertConfiguration<S,D>andSkipWhenNull()Expects the mapping to skip the transform function onnullinput.AssertConfiguration<S,D>andTest(Function<RS,RD> transformation)Expects the mapping to not skip the transform function onnullinput.<E extends Exception>
AssertConfiguration<S,D>withPropertyPath(com.remondis.propertypath.api.PropertyPath<RD,RS,E> propertyPath)Expects the mapping to evaluate the exact property path that was specified.AssertConfiguration<S,D>withPropertyPathAndTransformation(com.remondis.propertypath.api.PropertyPath<?,RS,?> propertyPath)Expects the mapping to evaluate the exact property path that was specified.
-
-
-
Method Detail
-
withPropertyPath
public <E extends Exception> AssertConfiguration<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
AssertConfigurationfor 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
AssertConfigurationfor further configuration.
-
andTest
public AssertConfiguration<S,D> andTest(Function<RS,RD> transformation)
Expects the mapping to not skip the transform function onnullinput. The specified transform function will be checked againstnullinput.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
nullcheck on the specified function.- Parameters:
transformation- The transformation to test.- Returns:
- Returns the
AssertConfigurationfor further configuration.
-
andSkipWhenNull
public AssertConfiguration<S,D> andSkipWhenNull()
Expects the mapping to skip the transform function onnullinput.- Returns:
- Returns the
AssertConfigurationfor further configuration.
-
-