|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object hirondelle.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 ServletConfig
public Enumeration getInitParameterNames()
getInitParameterNames
in interface ServletConfig
public ServletContext getServletContext()
FakeServletContext
.
getServletContext
in interface ServletConfig
public String getServletName()
getServletName
in interface ServletConfig
|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |