Package org.jmock.core.stub
Class StubSequence
java.lang.Object
org.jmock.core.stub.StubSequence
- All Implemented Interfaces:
SelfDescribing
,Stub
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescribeTo
(StringBuffer buffer) Appends the description of this object to the buffer.invoke
(Invocation invocation) Processes the invocation.
-
Constructor Details
-
StubSequence
-
-
Method Details
-
invoke
Description copied from interface:Stub
Processes the invocation.- Specified by:
invoke
in interfaceStub
- 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. - Throws:
Throwable
- An exception to be thrown to the caller, if not returning a value. A checked exception thrown from this invokedMethod must be in thethrows
list of the invoked method.
-
describeTo
Description copied from interface:SelfDescribing
Appends the description of this object to the buffer.- Specified by:
describeTo
in interfaceSelfDescribing
- Parameters:
buffer
- The buffer that the description is appended to.- Returns:
- The buffer passed to the invokedMethod.
-