KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > dynamic > ThrowStub


1 /*
2  * Created on 07-Apr-2003
3  */

4 package com.mockobjects.dynamic;
5
6 /**
7  * @author dev
8  */

9 public class ThrowStub
10     extends CallStub
11 {
12     private Throwable JavaDoc throwable;
13     
14     public ThrowStub( Throwable JavaDoc throwable ) {
15         this.throwable = throwable;
16     }
17     
18     public Object JavaDoc call(Mock mock, String JavaDoc methodName, Object JavaDoc[] args) throws Throwable JavaDoc {
19         throw throwable;
20     }
21     
22     public String JavaDoc getDescription() {
23         return "throws <" + throwable + ">";
24     }
25 }
26
Popular Tags