org.jmock.core
public class InvocationMocker extends java.lang.Object implements Invokable, StubMatchersCollection
Modifier and Type | Class and Description |
---|---|
static interface |
InvocationMocker.Describer |
Modifier and Type | Field and Description |
---|---|
static InvocationMocker.Describer |
DEFAULT_DESCRIBER |
Constructor and Description |
---|
InvocationMocker() |
InvocationMocker(InvocationMocker.Describer describer) |
Modifier and Type | Method and Description |
---|---|
void |
addMatcher(InvocationMatcher matcher) |
java.lang.StringBuffer |
describeTo(java.lang.StringBuffer buffer)
Appends the description of this object to the buffer.
|
boolean |
hasDescription() |
java.lang.Object |
invoke(Invocation invocation) |
boolean |
matches(Invocation invocation) |
void |
setName(java.lang.String name) |
void |
setStub(Stub stub) |
java.lang.String |
toString() |
void |
verify()
Throw an AssertionFailedException if any expectations have not been met.
|
public static final InvocationMocker.Describer DEFAULT_DESCRIBER
public InvocationMocker()
public InvocationMocker(InvocationMocker.Describer describer)
public boolean matches(Invocation invocation)
public java.lang.Object invoke(Invocation invocation) throws java.lang.Throwable
public void verify()
Verifiable
verify
in interface Verifiable
public void setName(java.lang.String name)
setName
in interface StubMatchersCollection
public void addMatcher(InvocationMatcher matcher)
addMatcher
in interface StubMatchersCollection
public void setStub(Stub stub)
setStub
in interface StubMatchersCollection
public java.lang.String toString()
toString
in class java.lang.Object
public boolean hasDescription()
hasDescription
in interface Invokable
public java.lang.StringBuffer describeTo(java.lang.StringBuffer buffer)
SelfDescribing
describeTo
in interface SelfDescribing
buffer
- The buffer that the description is appended to.