public class ClonerTester extends Object
Modifier and Type | Method and Description |
---|---|
static <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.
|
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)
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 cloneCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.