org.jmock.core
Class InvocationMocker
java.lang.Object
   org.jmock.core.InvocationMocker
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:
- matchesin interface- Invokable
 
- 
 
invoke
public Object invoke(Invocation invocation)
              throws Throwable
- 
- Specified by:
- invokein interface- Invokable
 
- 
- Throws:
- Throwable
 
verify
public void verify()
- Description copied from interface: Verifiable
- Throw an AssertionFailedException if any expectations have not been met.
 Implementations of this method must be idempotent: jMock can call this method
 more than once when verifying expectations at the end of a test.
 
- 
- Specified by:
- verifyin interface- Verifiable
 
- 
 
setName
public void setName(String name)
- 
- Specified by:
- setNamein interface- StubMatchersCollection
 
- 
 
addMatcher
public void addMatcher(InvocationMatcher matcher)
- 
- Specified by:
- addMatcherin interface- StubMatchersCollection
 
- 
 
setStub
public void setStub(Stub stub)
- 
- Specified by:
- setStubin interface- StubMatchersCollection
 
- 
 
toString
public String toString()
- 
- Overrides:
- toStringin class- Object
 
- 
 
hasDescription
public boolean hasDescription()
- 
- Specified by:
- hasDescriptionin interface- Invokable
 
- 
 
describeTo
public StringBuffer describeTo(StringBuffer buffer)
- Description copied from interface: SelfDescribing
- Appends the description of this object to the buffer.
 
- 
- Specified by:
- describeToin interface- SelfDescribing
 
- 
- Parameters:
- buffer- The buffer that the description is appended to.
- Returns:
- The buffer passed to the invokedMethod.