com.atlassian.bamboo.utils
Class ClonerTester

java.lang.Object
  extended by com.atlassian.bamboo.utils.ClonerTester

public class ClonerTester
extends java.lang.Object


Method Summary
static
<T> void
testCloning(com.google.common.base.Function<? super T,? super T> initialiser, com.google.common.base.Function<? super T,? super T> cloner, java.lang.Class<T> aClass)
          This method can be used to verify that your cloning function leaves no fields uninitialised in the clone.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

testCloning

public static <T> void testCloning(@Nullable
                                   com.google.common.base.Function<? super T,? super T> initialiser,
                                   @NotNull
                                   com.google.common.base.Function<? super T,? super T> cloner,
                                   @NotNull
                                   java.lang.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 object
aClass - the concrete class of the object to clone


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.