|
Fish & Chips Club 4.7.1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objecthirondelle.fish.test.doubles.FakeServletConfig
public class FakeServletConfig
Fake implementation of ServletConfig, used only for testing outside
of the regular runtime environment.
This class fakes the data in web.xml, and returns a
FakeServletContext. The ServletContext is needed for scanning in
your .sql files. As well, it references FakeConnectionSrc.
The main use case for this class is to be passed to
Controller.init(javax.servlet.ServletConfig).
This implementation hard-codes its data. Other implementations might read data from another source - perhaps a properties file, or perhaps web.xml itself.
| Field Summary | |
|---|---|
static String |
SERVLET_NAME
Value : "Fake Testing Servlet". |
| Constructor Summary | |
|---|---|
FakeServletConfig()
Constructor. |
|
| Method Summary | |
|---|---|
String |
getInitParameter(String aParamName)
|
Enumeration |
getInitParameterNames()
|
ServletContext |
getServletContext()
Returns a FakeServletContext. |
String |
getServletName()
Returns "Fake Testing Servlet". |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SERVLET_NAME
| Constructor Detail |
|---|
public FakeServletConfig()
throws FileNotFoundException
FakeServletContext, and hard-codes its init params.
FileNotFoundException| Method Detail |
|---|
public String getInitParameter(String aParamName)
getInitParameter in interface ServletConfigpublic Enumeration getInitParameterNames()
getInitParameterNames in interface ServletConfigpublic ServletContext getServletContext()
FakeServletContext.
getServletContext in interface ServletConfigpublic String getServletName()
getServletName in interface ServletConfig
|
Fish & Chips Club 4.7.1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||