org.jmock.core

Interface Stub

All Superinterfaces:
SelfDescribing
Known Implementing Classes:
CustomStub, DefaultResultStub, ReturnStub, StubSequence, TestFailureStub, ThrowStub, VoidStub

public interface Stub
extends SelfDescribing

An object that stubs the behaviour of a invokedMethod invocation on behalf of an Invokable object.

Method Summary

Object
invoke(Invocation invocation)
Processes the invocation.

Methods inherited from interface org.jmock.core.SelfDescribing

describeTo

Method Details

invoke

public Object invoke(Invocation invocation)
            throws Throwable
Processes the invocation.
Parameters:
invocation - The invocation to stub.
Returns:
The result of the invocation, if not throwing an exception. Must return null if the invocation is of a invokedMethod with a void return type.