test.jmock.core.testsupport
Class MockInvocationDispatcher

java.lang.Object
  extended bytest.jmock.core.testsupport.MockVerifiable
      extended bytest.jmock.core.testsupport.MockInvocationDispatcher
All Implemented Interfaces:
InvocationDispatcher, SelfDescribing, Verifiable

public class MockInvocationDispatcher
extends MockVerifiable
implements InvocationDispatcher


Field Summary
 ExpectationValue addInvokable
           
 ExpectationCounter clearCalls
           
 ExpectationValue dispatchInvocation
           
 Object dispatchResult
           
 Throwable dispatchThrowable
           
 ExpectationValue setDefaultStub
           
 String writeToOutput
           
 
Fields inherited from class test.jmock.core.testsupport.MockVerifiable
verifyCalls, verifyFailure
 
Constructor Summary
MockInvocationDispatcher()
           
 
Method Summary
 void add(Invokable invokable)
           
 void clear()
           
 StringBuffer describeTo(StringBuffer buffer)
          Appends the description of this object to the buffer.
 Object dispatch(Invocation invocation)
           
 void setDefaultStub(Stub newDefaultStub)
           
 
Methods inherited from class test.jmock.core.testsupport.MockVerifiable
setExpectedVerifyCalls, verify, verifyExpectations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jmock.core.Verifiable
verify
 

Field Detail

dispatchInvocation

public ExpectationValue dispatchInvocation

dispatchResult

public Object dispatchResult

dispatchThrowable

public Throwable dispatchThrowable

addInvokable

public ExpectationValue addInvokable

clearCalls

public ExpectationCounter clearCalls

writeToOutput

public String writeToOutput

setDefaultStub

public ExpectationValue setDefaultStub
Constructor Detail

MockInvocationDispatcher

public MockInvocationDispatcher()
Method Detail

setDefaultStub

public void setDefaultStub(Stub newDefaultStub)
Specified by:
setDefaultStub in interface InvocationDispatcher

add

public void add(Invokable invokable)
Specified by:
add in interface InvocationDispatcher

clear

public void clear()
Specified by:
clear in interface InvocationDispatcher

dispatch

public Object dispatch(Invocation invocation)
                throws Throwable
Specified by:
dispatch in interface InvocationDispatcher
Throws:
Throwable

describeTo

public StringBuffer describeTo(StringBuffer buffer)
Description copied from interface: SelfDescribing
Appends the description of this object to the buffer.

Specified by:
describeTo in interface SelfDescribing
Parameters:
buffer - The buffer that the description is appended to.
Returns:
The buffer passed to the invokedMethod.