Top Description Methods
org.easymock

public Interface IAnswer<T>

Known Direct Implementers
org.easymock.internal.Result
Type Parameters
<T>
the type to return.

Used to answer expected calls.
Author
OFFIS, Tammo Freese

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the value to be returned
answer
()

Is called by EasyMock to answer an expected call.

Method Detail

answerback to summary
public T answer() throws Throwable

Is called by EasyMock to answer an expected call. The answer may be to return a value, or to throw an exception. The arguments of the call for which the answer is generated are available via EasyMock#getCurrentArgument(int) or EasyMock#getCurrentArguments(). The former method is preferred since it will infer the argument type.

Returns:T

the value to be returned

Exceptions
Throwable:
the throwable to be thrown