org.unitils.mock.core
Class MockProxy<T>
java.lang.Object
org.unitils.mock.core.MockProxy<T>
- Direct Known Subclasses:
- PartialMockProxy
public class MockProxy<T>
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
proxy
protected T proxy
oneTimeMatchingBehaviorDefiningInvocations
protected BehaviorDefiningInvocations oneTimeMatchingBehaviorDefiningInvocations
alwaysMatchingBehaviorDefiningInvocations
protected BehaviorDefiningInvocations alwaysMatchingBehaviorDefiningInvocations
scenario
protected Scenario scenario
matchingInvocationBuilder
protected MatchingInvocationBuilder matchingInvocationBuilder
MockProxy
public MockProxy(String mockName,
Class<T> mockedType,
BehaviorDefiningInvocations oneTimeMatchingBehaviorDefiningInvocations,
BehaviorDefiningInvocations alwaysMatchingBehaviorDefiningInvocations,
Scenario scenario,
MatchingInvocationBuilder matchingInvocationBuilder)
getProxy
public T getProxy()
handleMockInvocation
protected Object handleMockInvocation(ProxyInvocation proxyInvocation)
throws Throwable
- Throws:
Throwable
getMatchingBehaviorDefiningInvocation
protected BehaviorDefiningInvocation getMatchingBehaviorDefiningInvocation(ProxyInvocation proxyInvocation)
throws Throwable
- Throws:
Throwable
getValidMockBehavior
protected MockBehavior getValidMockBehavior(ProxyInvocation proxyInvocation,
BehaviorDefiningInvocation behaviorDefiningInvocation)
assertCanExecute
protected void assertCanExecute(MockBehavior mockBehavior,
ProxyInvocation proxyInvocation,
BehaviorDefiningInvocation behaviorDefiningInvocation)
- Check whether the mock behavior can applied for this invocation
- Parameters:
mockBehavior
- The behavior to verify, not nullproxyInvocation
- The invocation, not nullbehaviorDefiningInvocation
- The invocation that defined the behavior, not null
getDefaultMockBehavior
protected MockBehavior getDefaultMockBehavior(ProxyInvocation proxyInvocation)
Copyright © 2011. All Rights Reserved.