1   /*
2    * Copyright 2008 Hippo
3    *
4    * Licensed under the Apache License, Version 2.0 (the  "License"); 
5    * you may not use this file except in compliance with the License. 
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" 
12   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
13   * See the License for the specific language governing permissions and 
14   * limitations under the License.
15   */
16  package nl.hippo.client.webapp.matchers;
17  
18  import java.io.InputStream;
19  import java.net.MalformedURLException;
20  import java.net.URL;
21  import java.util.Enumeration;
22  import java.util.Set;
23  
24  import javax.servlet.RequestDispatcher;
25  import javax.servlet.Servlet;
26  import javax.servlet.ServletContext;
27  import javax.servlet.ServletException;
28  
29  public class MockHttpServletContext implements ServletContext {
30  
31      public Object getAttribute(String arg0) {
32          return null;
33      }
34  
35      public Enumeration getAttributeNames() {
36          return null;
37      }
38  
39      public ServletContext getContext(String arg0) {
40          return null;
41      }
42  
43      public String getInitParameter(String arg0) {
44          return null;
45      }
46  
47      public Enumeration getInitParameterNames() {
48          return null;
49      }
50  
51      public int getMajorVersion() {
52          return 0;
53      }
54  
55      public String getMimeType(String arg0) {
56          return null;
57      }
58  
59      public int getMinorVersion() {
60          return 0;
61      }
62  
63      public RequestDispatcher getNamedDispatcher(String arg0) {
64          return null;
65      }
66  
67      public String getRealPath(String arg0) {
68          return null;
69      }
70  
71      public RequestDispatcher getRequestDispatcher(String arg0) {
72          return null;
73      }
74  
75      public URL getResource(String arg0) throws MalformedURLException {
76          return null;
77      }
78  
79      public InputStream getResourceAsStream(String arg0) {
80          return null;
81      }
82  
83      public Set getResourcePaths(String arg0) {
84          return null;
85      }
86  
87      public String getServerInfo() {
88          return null;
89      }
90  
91      public Servlet getServlet(String arg0) throws ServletException {
92          return null;
93      }
94  
95      public String getServletContextName() {
96          return null;
97      }
98  
99      public Enumeration getServletNames() {
100         return null;
101     }
102 
103     public Enumeration getServlets() {
104         return null;
105     }
106 
107     public void log(String arg0) {
108     }
109 
110     public void log(Exception arg0, String arg1) {
111     }
112 
113     public void log(String arg0, Throwable arg1) {
114     }
115 
116     public void removeAttribute(String arg0) {
117     }
118 
119     public void setAttribute(String arg0, Object arg1) {
120     }
121 
122 }