Package com.atlassian.bamboo.utils
Class ClonerTester
java.lang.Object
com.atlassian.bamboo.utils.ClonerTester
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
testCloning
(@Nullable Function<? super T, ? super T> initialiser, @NotNull Function<? super T, ? super T> cloner, @NotNull Class<T> aClass) This method can be used to verify that your cloning function leaves no fields uninitialised in the clone.
-
Method Details
-
testCloning
public static <T> void testCloning(@Nullable @Nullable Function<? super T, ? super T> initialiser, @NotNull @NotNull Function<? super T, ? super T> cloner, @NotNull @NotNull Class<T> aClass) This method can be used to verify that your cloning function leaves no fields uninitialised in the clone.- Parameters:
initialiser
- optional custom initialiser used to mock some funvtions to workaround Mockito bugs or cater for more complex cloners (e.g. recursive ones)cloner
- the function capable of cloning your objectaClass
- the concrete class of the object to clone
-