org.unitils.mock.core
Class BehaviorDefiningInvocation
java.lang.Object
org.unitils.mock.core.proxy.ProxyInvocation
org.unitils.mock.core.BehaviorDefiningInvocation
public class BehaviorDefiningInvocation
- extends ProxyInvocation
todo javadoc
- 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 |
BehaviorDefiningInvocation
public BehaviorDefiningInvocation(ProxyInvocation proxyInvocation,
MockBehavior mockBehavior,
java.util.List<ArgumentMatcher> argumentMatchers)
- Creates a behavior defining 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 nullmockBehavior - The behavior to execute, not nullargumentMatchers - The argument matchers to use when matching the invocation, not null
getArgumentMatchers
public java.util.List<ArgumentMatcher> getArgumentMatchers()
- Returns:
- The argument matchers to use when matching the invocation, not null
getMockBehavior
public MockBehavior getMockBehavior()
- Returns:
- The behavior to execute, not null
setMockBehavior
public void setMockBehavior(MockBehavior mockBehavior)
isUsed
public boolean isUsed()
- Returns:
- True if this invocation was already matched and used before and should no longer be used
markAsUsed
public void markAsUsed()
matches
public boolean matches(ProxyInvocation proxyInvocation)
- Returns whether or not the given
ProxyInvocation matches this object's predefined Method and arguments.
- Parameters:
proxyInvocation - the ProxyInvocation to match.
- Returns:
- true when given
ProxyInvocation matches, false otherwise.
Copyright © 2009. All Rights Reserved.