org.jmock.stub
Class ThrowStub

java.lang.Object
  extended byorg.jmock.stub.CallStub
      extended byorg.jmock.stub.ThrowStub
All Implemented Interfaces:
Stub

public class ThrowStub
extends CallStub


Constructor Summary
ThrowStub(java.lang.Throwable throwable)
           
 
Method Summary
 java.lang.String getDescription()
           
 java.lang.Object invoke(Invocation invocation)
          Processes the invocation.
 
Methods inherited from class org.jmock.stub.CallStub
verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrowStub

public ThrowStub(java.lang.Throwable throwable)
Method Detail

invoke

public java.lang.Object invoke(Invocation invocation)
                        throws java.lang.Throwable
Description copied from interface: Stub
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.