KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > atlassian > seraph > util > LocalMockHttpServletRequest


1 package com.atlassian.seraph.util;
2
3 import com.mockobjects.servlet.MockHttpServletRequest;
4 import com.mockobjects.ReturnValue;
5
6 /** For some reason the mockobjects wankers did not implement getRequestURL.
7  * Not a hint in the comments as to why... grr
8  */

9 public class LocalMockHttpServletRequest extends MockHttpServletRequest
10 {
11     private final ReturnValue myRequestURL = new ReturnValue("request url");
12
13
14     public void setupGetRequestURL(String JavaDoc requestURL)
15     {
16         myRequestURL.setValue(requestURL);
17     }
18
19     public StringBuffer JavaDoc getRequestURL()
20     {
21         return new StringBuffer JavaDoc((String JavaDoc) myRequestURL.getValue());
22     }
23 }
24
Popular Tags