public class MockClosureProxy extends AbstractClosureProxy
| Constructor and Description |
|---|
MockClosureProxy(groovy.lang.Closure<?> target,
java.lang.String methodName,
java.lang.Object expectation)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected groovy.lang.Closure<?> |
createWrapper(groovy.lang.Closure<?> c)
Creates a new
MockClosureProxy wrapping the given
closure. |
protected void |
doAfterCall(java.lang.Object[] args)
Empty implementation.
|
protected void |
doBeforeCall(java.lang.Object[] args)
Checks whether the target "method" is expected or not, on the
basis that this closure is mocking a method with the name
methodName. |
asWritable, call, curry, equals, getDelegate, getDirective, getMaximumNumberOfParameters, getParameterTypes, getProperty, getResolveStrategy, hashCode, isCase, setDelegate, setDirective, setProperty, setResolveStrategycall, call, clone, curry, dehydrate, getOwner, getThisObject, leftShift, leftShift, memoize, memoizeAtLeast, memoizeAtMost, memoizeBetween, ncurry, ncurry, rcurry, rcurry, rehydrate, rightShift, run, throwRuntimeException, trampoline, trampolinepublic MockClosureProxy(groovy.lang.Closure<?> target,
java.lang.String methodName,
java.lang.Object expectation)
target - methodName - expectation - protected void doBeforeCall(java.lang.Object[] args)
methodName.doBeforeCall in class AbstractClosureProxyargs - The arguments to the "method" (actually
the argumetns to the target closure invocation).protected void doAfterCall(java.lang.Object[] args)
doAfterCall in class AbstractClosureProxyargs - The arguments to the target closure.protected groovy.lang.Closure<?> createWrapper(groovy.lang.Closure<?> c)
MockClosureProxy wrapping the given
closure.createWrapper in class AbstractClosureProxyc - The closure to wrap.