org.unitils.mock.core
Class ObservedInvocation
java.lang.Object
org.unitils.mock.core.proxy.ProxyInvocation
org.unitils.mock.core.ObservedInvocation
public class ObservedInvocation
- extends ProxyInvocation
- Author:
- Filip Neven, Tim Ducheyne, Kenny Claes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObservedInvocation
public ObservedInvocation(ProxyInvocation proxyInvocation,
BehaviorDefiningInvocation behaviorDefiningInvocation,
MockBehavior mockBehavior)
- Creates a observed invocation for the given prosy invocation.
The argumentsAtInvocationTime should be copies (deep clones) of the arguments at the time of
the invocation. This way the original values can still be used later-on even when changes
occur to the original values (pass-by-value vs pass-by-reference).
- Parameters:
proxyInvocation
- The proxy invocation, not nullbehaviorDefiningInvocation
- The invocation that defined the behavior, null if there is no behaviormockBehavior
- The executed behavior, not null
setResult
public void setResult(Object result)
- Sets the result of the invocation.
This is set afterwards to make it possible to get the correct sequence in the report when there are nested mock
invocations.
- Parameters:
result
- The result of the invocation
getResult
public Object getResult()
getResultAtInvocationTime
public Object getResultAtInvocationTime()
getBehaviorDefiningInvocation
public BehaviorDefiningInvocation getBehaviorDefiningInvocation()
getMockBehavior
public MockBehavior getMockBehavior()
hasMockBehavior
public boolean hasMockBehavior()
Copyright © 2011. All Rights Reserved.