org.unitils.mock.core
Class ObservedInvocation

java.lang.Object
  extended by org.unitils.mock.core.proxy.ProxyInvocation
      extended by org.unitils.mock.core.ObservedInvocation

public class ObservedInvocation
extends ProxyInvocation

Author:
Filip Neven, Tim Ducheyne, Kenny Claes

Constructor Summary
ObservedInvocation(java.lang.Object result, ProxyInvocation proxyInvocation, BehaviorDefiningInvocation behaviorDefiningInvocation, MockBehavior mockBehavior)
          Creates a observed invocation for the given prosy invocation.
 
Method Summary
 BehaviorDefiningInvocation getBehaviorDefiningInvocation()
           
 MockBehavior getMockBehavior()
           
 java.lang.Object getResult()
           
 java.lang.Object getResultAtInvocationTime()
           
 boolean hasMockBehavior()
           
 
Methods inherited from class org.unitils.mock.core.proxy.ProxyInvocation
getArguments, getArgumentsAtInvocationTime, getInvokedAt, getInvokedAtTrace, getLineNumber, getMethod, getMockName, getNrOfNotNullArguments, getProxy, invokeOriginalBehavior
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObservedInvocation

public ObservedInvocation(java.lang.Object result,
                          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:
result - The result of the invocation
proxyInvocation - The proxy invocation, not null
behaviorDefiningInvocation - The invocation that defined the behavior, null if there is no behavior
mockBehavior - The executed behavior, not null
Method Detail

getResult

public java.lang.Object getResult()

getResultAtInvocationTime

public java.lang.Object getResultAtInvocationTime()

getBehaviorDefiningInvocation

public BehaviorDefiningInvocation getBehaviorDefiningInvocation()

getMockBehavior

public MockBehavior getMockBehavior()

hasMockBehavior

public boolean hasMockBehavior()


Copyright © 2009. All Rights Reserved.