org.unitils.mock.core.matching.impl
Class BehaviorDefiningMatchingInvocationHandler

java.lang.Object
  extended by org.unitils.mock.core.matching.impl.BehaviorDefiningMatchingInvocationHandler
All Implemented Interfaces:
MatchingInvocationHandler

public class BehaviorDefiningMatchingInvocationHandler
extends Object
implements MatchingInvocationHandler

Author:
Tim Ducheyne, Filip Neven

Nested Class Summary
static class BehaviorDefiningMatchingInvocationHandler.ChainedMockBehavior
           
 
Field Summary
protected  BehaviorDefiningInvocations behaviorDefiningInvocations
           
protected  MockBehavior mockBehavior
           
protected  MockFactory mockFactory
           
 
Constructor Summary
BehaviorDefiningMatchingInvocationHandler(MockBehavior mockBehavior, BehaviorDefiningInvocations behaviorDefiningInvocations, MockFactory mockFactory)
           
 
Method Summary
protected  void addBehaviorDefiningInvocation(BehaviorDefiningInvocation behaviorDefiningInvocation, BehaviorDefiningInvocations behaviorDefinition)
           
protected  Object createChainedMock(ProxyInvocation proxyInvocation, BehaviorDefiningInvocation behaviorDefiningInvocation)
           
 Object handleInvocation(ProxyInvocation proxyInvocation, List<ArgumentMatcher> argumentMatchers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mockBehavior

protected MockBehavior mockBehavior

mockFactory

protected MockFactory mockFactory

behaviorDefiningInvocations

protected BehaviorDefiningInvocations behaviorDefiningInvocations
Constructor Detail

BehaviorDefiningMatchingInvocationHandler

public BehaviorDefiningMatchingInvocationHandler(MockBehavior mockBehavior,
                                                 BehaviorDefiningInvocations behaviorDefiningInvocations,
                                                 MockFactory mockFactory)
Method Detail

handleInvocation

public Object handleInvocation(ProxyInvocation proxyInvocation,
                               List<ArgumentMatcher> argumentMatchers)
                        throws Throwable
Specified by:
handleInvocation in interface MatchingInvocationHandler
Throws:
Throwable

addBehaviorDefiningInvocation

protected void addBehaviorDefiningInvocation(BehaviorDefiningInvocation behaviorDefiningInvocation,
                                             BehaviorDefiningInvocations behaviorDefinition)

createChainedMock

protected Object createChainedMock(ProxyInvocation proxyInvocation,
                                   BehaviorDefiningInvocation behaviorDefiningInvocation)


Copyright © 2011. All Rights Reserved.