InvocationDispatcher
, SelfDescribing
, Verifiable
FIFOInvocationDispatcher
, LIFOInvocationDispatcher
public abstract class AbstractInvocationDispatcher extends java.lang.Object implements InvocationDispatcher
Modifier and Type | Field | Description |
---|---|---|
protected Stub |
defaultStub |
|
protected java.util.List |
invokables |
|
static java.lang.String |
NO_EXPECTATIONS_MESSAGE |
Constructor | Description |
---|---|
AbstractInvocationDispatcher() |
Modifier and Type | Method | Description |
---|---|---|
void |
add(Invokable invokable) |
|
void |
clear() |
|
java.lang.StringBuffer |
describeTo(java.lang.StringBuffer buffer) |
Appends the description of this object to the buffer.
|
java.lang.Object |
dispatch(Invocation invocation) |
|
protected abstract java.util.Iterator |
dispatchOrder(java.util.List invokablesList) |
|
void |
setDefaultStub(Stub defaultStub) |
|
void |
verify() |
Throw an AssertionFailedException if any expectations have not been met.
|
public static final java.lang.String NO_EXPECTATIONS_MESSAGE
protected java.util.List invokables
protected Stub defaultStub
public void setDefaultStub(Stub defaultStub)
setDefaultStub
in interface InvocationDispatcher
public void add(Invokable invokable)
add
in interface InvocationDispatcher
public void verify()
Verifiable
verify
in interface Verifiable
public void clear()
clear
in interface InvocationDispatcher
public java.lang.StringBuffer describeTo(java.lang.StringBuffer buffer)
SelfDescribing
describeTo
in interface SelfDescribing
buffer
- The buffer that the description is appended to.public java.lang.Object dispatch(Invocation invocation) throws java.lang.Throwable
dispatch
in interface InvocationDispatcher
java.lang.Throwable
protected abstract java.util.Iterator dispatchOrder(java.util.List invokablesList)