View Javadoc

1   package com.philemonworks.selfdiagnose.test.xtra;
2   
3   import java.io.BufferedReader;
4   import java.io.IOException;
5   import java.io.UnsupportedEncodingException;
6   import java.security.Principal;
7   import java.util.Enumeration;
8   import java.util.HashMap;
9   import java.util.Locale;
10  import java.util.Map;
11  
12  import javax.servlet.RequestDispatcher;
13  import javax.servlet.ServletInputStream;
14  import javax.servlet.http.Cookie;
15  import javax.servlet.http.HttpServletRequest;
16  import javax.servlet.http.HttpSession;
17  
18  public class MockHttpRequest implements HttpServletRequest {
19      public String method = "GET";
20      public Map parameters = new HashMap();
21      
22      public String getAuthType() {
23          // TODO Auto-generated method stub
24          return null;
25      }
26  
27      public String getContextPath() {
28          // TODO Auto-generated method stub
29          return null;
30      }
31  
32      public Cookie[] getCookies() {
33          // TODO Auto-generated method stub
34          return null;
35      }
36  
37      public long getDateHeader(String arg0) {
38          // TODO Auto-generated method stub
39          return 0;
40      }
41  
42      public String getHeader(String arg0) {
43          // TODO Auto-generated method stub
44          return null;
45      }
46  
47      public Enumeration getHeaderNames() {
48          // TODO Auto-generated method stub
49          return null;
50      }
51  
52      public Enumeration getHeaders(String arg0) {
53          // TODO Auto-generated method stub
54          return null;
55      }
56  
57      public int getIntHeader(String arg0) {
58          // TODO Auto-generated method stub
59          return 0;
60      }
61  
62      public String getMethod() {
63          // TODO Auto-generated method stub
64          return method;
65      }
66  
67      public String getPathInfo() {
68          // TODO Auto-generated method stub
69          return null;
70      }
71  
72      public String getPathTranslated() {
73          // TODO Auto-generated method stub
74          return null;
75      }
76  
77      public String getQueryString() {
78          // TODO Auto-generated method stub
79          return null;
80      }
81  
82      public String getRemoteUser() {
83          // TODO Auto-generated method stub
84          return null;
85      }
86  
87      public String getRequestURI() {
88          // TODO Auto-generated method stub
89          return null;
90      }
91  
92      public StringBuffer getRequestURL() {
93          return new StringBuffer("mock-url");
94      }
95  
96      public String getRequestedSessionId() {
97          // TODO Auto-generated method stub
98          return null;
99      }
100 
101     public String getServletPath() {
102         // TODO Auto-generated method stub
103         return null;
104     }
105 
106     public HttpSession getSession() {
107         // TODO Auto-generated method stub
108         return null;
109     }
110 
111     public HttpSession getSession(boolean arg0) {
112         // TODO Auto-generated method stub
113         return null;
114     }
115 
116     public Principal getUserPrincipal() {
117         // TODO Auto-generated method stub
118         return null;
119     }
120 
121     public boolean isRequestedSessionIdFromCookie() {
122         // TODO Auto-generated method stub
123         return false;
124     }
125 
126     public boolean isRequestedSessionIdFromURL() {
127         // TODO Auto-generated method stub
128         return false;
129     }
130 
131     public boolean isRequestedSessionIdFromUrl() {
132         // TODO Auto-generated method stub
133         return false;
134     }
135 
136     public boolean isRequestedSessionIdValid() {
137         // TODO Auto-generated method stub
138         return false;
139     }
140 
141     public boolean isUserInRole(String arg0) {
142         // TODO Auto-generated method stub
143         return false;
144     }
145 
146     public Object getAttribute(String arg0) {
147         // TODO Auto-generated method stub
148         return null;
149     }
150 
151     public Enumeration getAttributeNames() {
152         // TODO Auto-generated method stub
153         return null;
154     }
155 
156     public String getCharacterEncoding() {
157         // TODO Auto-generated method stub
158         return null;
159     }
160 
161     public int getContentLength() {
162         // TODO Auto-generated method stub
163         return 0;
164     }
165 
166     public String getContentType() {
167         // TODO Auto-generated method stub
168         return null;
169     }
170 
171     public ServletInputStream getInputStream() throws IOException {
172         // TODO Auto-generated method stub
173         return null;
174     }
175 
176     public String getLocalAddr() {
177         // TODO Auto-generated method stub
178         return null;
179     }
180 
181     public String getLocalName() {
182         // TODO Auto-generated method stub
183         return null;
184     }
185 
186     public int getLocalPort() {
187         // TODO Auto-generated method stub
188         return 0;
189     }
190 
191     public Locale getLocale() {
192         // TODO Auto-generated method stub
193         return null;
194     }
195 
196     public Enumeration getLocales() {
197         // TODO Auto-generated method stub
198         return null;
199     }
200 
201     public String getParameter(String arg0) {
202         // TODO Auto-generated method stub
203         return (String)parameters.get(arg0);
204     }
205 
206     public Map getParameterMap() {
207         // TODO Auto-generated method stub
208         return null;
209     }
210 
211     public Enumeration getParameterNames() {
212         // TODO Auto-generated method stub
213         return null;
214     }
215 
216     public String[] getParameterValues(String arg0) {
217         // TODO Auto-generated method stub
218         return null;
219     }
220 
221     public String getProtocol() {
222         // TODO Auto-generated method stub
223         return null;
224     }
225 
226     public BufferedReader getReader() throws IOException {
227         // TODO Auto-generated method stub
228         return null;
229     }
230 
231     public String getRealPath(String arg0) {
232         // TODO Auto-generated method stub
233         return null;
234     }
235 
236     public String getRemoteAddr() {
237         // TODO Auto-generated method stub
238         return null;
239     }
240 
241     public String getRemoteHost() {
242         // TODO Auto-generated method stub
243         return null;
244     }
245 
246     public int getRemotePort() {
247         // TODO Auto-generated method stub
248         return 0;
249     }
250 
251     public RequestDispatcher getRequestDispatcher(String arg0) {
252         // TODO Auto-generated method stub
253         return null;
254     }
255 
256     public String getScheme() {
257         // TODO Auto-generated method stub
258         return null;
259     }
260 
261     public String getServerName() {
262         // TODO Auto-generated method stub
263         return null;
264     }
265 
266     public int getServerPort() {
267         // TODO Auto-generated method stub
268         return 0;
269     }
270 
271     public boolean isSecure() {
272         // TODO Auto-generated method stub
273         return false;
274     }
275 
276     public void removeAttribute(String arg0) {
277         // TODO Auto-generated method stub
278     }
279 
280     public void setAttribute(String arg0, Object arg1) {
281         // TODO Auto-generated method stub
282     }
283 
284     public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException {
285         // TODO Auto-generated method stub
286     }
287 }