org.jmock.core
Class InvocationMocker
java.lang.Object
org.jmock.core.InvocationMocker
- All Implemented Interfaces:
- Invokable, SelfDescribing, StubMatchersCollection, Verifiable
public class InvocationMocker
- extends Object
- implements Invokable, StubMatchersCollection
- Since:
- 1.0
DEFAULT_DESCRIBER
public static final InvocationMocker.Describer DEFAULT_DESCRIBER
InvocationMocker
public InvocationMocker()
InvocationMocker
public InvocationMocker(InvocationMocker.Describer describer)
matches
public boolean matches(Invocation invocation)
- Specified by:
matches
in interface Invokable
invoke
public Object invoke(Invocation invocation)
throws Throwable
- Specified by:
invoke
in interface Invokable
- Throws:
Throwable
verify
public void verify()
- Description copied from interface:
Verifiable
- Throw an AssertionFailedException if any expectations have not been met.
- Specified by:
verify
in interface Verifiable
setName
public void setName(String name)
- Specified by:
setName
in interface StubMatchersCollection
addMatcher
public void addMatcher(InvocationMatcher matcher)
- Specified by:
addMatcher
in interface StubMatchersCollection
setStub
public void setStub(Stub stub)
- Specified by:
setStub
in interface StubMatchersCollection
toString
public String toString()
- Overrides:
toString
in class Object
hasDescription
public boolean hasDescription()
- Specified by:
hasDescription
in interface Invokable
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.