KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > examples > password > StubServletConfig


1 package com.mockobjects.examples.password;
2
3 import java.util.Enumeration JavaDoc;
4 import javax.servlet.ServletConfig JavaDoc;
5 import javax.servlet.ServletContext JavaDoc;
6 import junit.framework.AssertionFailedError;
7
8 public class StubServletConfig implements ServletConfig JavaDoc {
9     public String JavaDoc getInitParameter(String JavaDoc s) {
10         throw new AssertionFailedError("not expected: " + s);
11     }
12
13     public Enumeration JavaDoc getInitParameterNames() {
14         throw new AssertionFailedError("not expected");
15     }
16
17     public ServletContext JavaDoc getServletContext() {
18         throw new AssertionFailedError("not expected");
19     }
20
21     public String JavaDoc getServletName() {
22         throw new AssertionFailedError("not expected");
23     }
24 }
25
Popular Tags