public class MockProxy<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
MockProxy.InvocationHandler |
| Modifier and Type | Field and Description |
|---|---|
protected BehaviorDefiningInvocations |
alwaysMatchingBehaviorDefiningInvocations |
protected MatchingInvocationBuilder |
matchingInvocationBuilder |
protected BehaviorDefiningInvocations |
oneTimeMatchingBehaviorDefiningInvocations |
protected T |
proxy |
protected Scenario |
scenario |
| Constructor and Description |
|---|
MockProxy(String mockName,
Class<T> mockedType,
BehaviorDefiningInvocations oneTimeMatchingBehaviorDefiningInvocations,
BehaviorDefiningInvocations alwaysMatchingBehaviorDefiningInvocations,
Scenario scenario,
MatchingInvocationBuilder matchingInvocationBuilder) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertCanExecute(MockBehavior mockBehavior,
ProxyInvocation proxyInvocation,
BehaviorDefiningInvocation behaviorDefiningInvocation)
Check whether the mock behavior can applied for this invocation
|
protected MockBehavior |
getDefaultMockBehavior(ProxyInvocation proxyInvocation) |
protected BehaviorDefiningInvocation |
getMatchingBehaviorDefiningInvocation(ProxyInvocation proxyInvocation) |
T |
getProxy() |
protected MockBehavior |
getValidMockBehavior(ProxyInvocation proxyInvocation,
BehaviorDefiningInvocation behaviorDefiningInvocation) |
protected Object |
handleMockInvocation(ProxyInvocation proxyInvocation) |
protected T proxy
protected BehaviorDefiningInvocations oneTimeMatchingBehaviorDefiningInvocations
protected BehaviorDefiningInvocations alwaysMatchingBehaviorDefiningInvocations
protected Scenario scenario
protected MatchingInvocationBuilder matchingInvocationBuilder
public MockProxy(String mockName, Class<T> mockedType, BehaviorDefiningInvocations oneTimeMatchingBehaviorDefiningInvocations, BehaviorDefiningInvocations alwaysMatchingBehaviorDefiningInvocations, Scenario scenario, MatchingInvocationBuilder matchingInvocationBuilder)
public T getProxy()
protected Object handleMockInvocation(ProxyInvocation proxyInvocation) throws Throwable
Throwableprotected BehaviorDefiningInvocation getMatchingBehaviorDefiningInvocation(ProxyInvocation proxyInvocation) throws Throwable
Throwableprotected MockBehavior getValidMockBehavior(ProxyInvocation proxyInvocation, BehaviorDefiningInvocation behaviorDefiningInvocation)
protected void assertCanExecute(MockBehavior mockBehavior, ProxyInvocation proxyInvocation, BehaviorDefiningInvocation behaviorDefiningInvocation)
mockBehavior - The behavior to verify, not nullproxyInvocation - The invocation, not nullbehaviorDefiningInvocation - The invocation that defined the behavior, not nullprotected MockBehavior getDefaultMockBehavior(ProxyInvocation proxyInvocation)
Copyright © 2016. All Rights Reserved.