org.jmock
Interface Stub

All Known Implementing Classes:
CallStub, ReturnStub

public interface Stub

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


Method Summary
 java.lang.String getDescription()
           
 java.lang.Object invoke(Invocation invocation)
          Processes the invocation.
 

Method Detail

invoke

public java.lang.Object invoke(Invocation invocation)
                        throws java.lang.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 method with a void return type.
Throws:
java.lang.Throwable - An exception to be thrown to the caller, if not returning a value. A checked exception thrown from this method must be in the throws list of the invoked method.

getDescription

public java.lang.String getDescription()


Copyright © 2003 jMock.org. All Rights Reserved.