| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| CloningBehavior |
|
| 0.0;0 |
| 1 | package biz.xsoftware.mock; | |
| 2 | ||
| 3 | /** | |
| 4 | * <p>The same exact thing as the Behavior method except a cloning method must be supplied to. | |
| 5 | * Sometimes the Behavior method will make modifications to the passed in parameter methods. | |
| 6 | * The cloning method allows the mockobject to take a snapshot of the parameters passed into | |
| 7 | * the method before they are modified. Then the test can still verify later the correct | |
| 8 | * parameters were passed in. So, if you are mocking a method</p> | |
| 9 | * | |
| 10 | * public int doSomethingCool(Map map, int i, long l); | |
| 11 | * <p> | |
| 12 | * Then you must have a cloning method of the form | |
| 13 | * </p> | |
| 14 | * public Object[] doSomethingCoolClone(Map map, int i, long l); | |
| 15 | * <p> | |
| 16 | * Notice that you probably only need to clone the Map and would need to return an object | |
| 17 | * array of all the parameters as so... new Object[] { clonedMap, i, l); | |
| 18 | * </p> | |
| 19 | * @author dhiller | |
| 20 | * | |
| 21 | */ | |
| 22 | public interface CloningBehavior extends Behavior | |
| 23 | { | |
| 24 | ||
| 25 | ||
| 26 | } |