KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

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