Class ServletWebContextTestCase
java.lang.Object
org.apache.commons.chain.ContextTestCase<ServletWebContext>
org.apache.commons.chain.web.ContextBaseTestWeb<ServletWebContext>
org.apache.commons.chain.web.jakarta.servlet.ServletWebContextTestCase
Extension of
ContextBaseTestCase
to validate the
extra functionality of this implementation.-
Field Summary
Modifier and TypeFieldDescriptionprotected jakarta.servlet.http.HttpServletRequest
Servlet API Objects - Requestprotected jakarta.servlet.http.HttpServletResponse
Servlet API Objects - Responseprotected jakarta.servlet.ServletContext
Servlet API Objects - Contextprotected jakarta.servlet.http.HttpSession
Servlet API Objects - SessionFields inherited from class org.apache.commons.chain.ContextTestCase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkEntrySet
(Map<String, ?> map, boolean modifiable) Test to ensure proper entrySet() and are modifiable optionallyprotected void
checkMapSize
(Map<String, ?> map, int size) protected ServletWebContext
Create a new instance of the appropriate Context type for this test casevoid
init()
Set up instance variables required by this test case.void
tearDown()
Tear down instance variables required by this test case.void
TestgetApplicationScope()
void
TestgetCookies()
void
Testequals()
andhashCode()
Copied from ContextBaseTestCase with customized creation of "other"void
TestgetHeader()
void
TestgetHeaderValues()
void
TestgetInitParam()
void
TestgetParam()
void
TestgetParamValues()
void
Test state of newly created instancevoid
Testrelease()
void
TestgetRequestScope()
void
TestgetSessionScope()
void
TestgetSessionScope()
without SessionMethods inherited from class org.apache.commons.chain.web.ContextBaseTestWeb
testSerialization
Methods inherited from class org.apache.commons.chain.ContextTestCase
checkAttributeCount, expectedAttributeCount, testAttributes, testContains, testKeySet, testPutAll
-
Field Details
-
scontext
Servlet API Objects - Context -
request
Servlet API Objects - Request -
response
Servlet API Objects - Response -
session
Servlet API Objects - Session
-
-
Constructor Details
-
ServletWebContextTestCase
public ServletWebContextTestCase()The Default-Constructor for this class.
-
-
Method Details
-
init
Set up instance variables required by this test case.- Overrides:
init
in classContextTestCase<ServletWebContext>
-
tearDown
Tear down instance variables required by this test case.- Overrides:
tearDown
in classContextTestCase<ServletWebContext>
-
testApplicationScope
TestgetApplicationScope()
-
testEquals
Testequals()
andhashCode()
Copied from ContextBaseTestCase with customized creation of "other"- Overrides:
testEquals
in classContextTestCase<ServletWebContext>
-
testHeader
TestgetHeader()
-
testHeaderValues
TestgetHeaderValues()
-
testInitParam
TestgetInitParam()
-
testParam
TestgetParam()
-
testParamValues
TestgetParamValues()
-
testCookies
TestgetCookies()
-
testPristine
Test state of newly created instance- Overrides:
testPristine
in classContextTestCase<ServletWebContext>
-
testRelease
Testrelease()
-
testRequestScope
TestgetRequestScope()
-
testSessionScope
TestgetSessionScope()
-
testSessionScopeWithoutSession
TestgetSessionScope()
without Session -
checkMapSize
-
checkEntrySet
Test to ensure proper entrySet() and are modifiable optionally- Parameters:
map
- to testmodifiable
-true
if map is modifiable
-
createContext
Create a new instance of the appropriate Context type for this test case- Specified by:
createContext
in classContextTestCase<ServletWebContext>
- Returns:
- a new instance of the appropriate Context type
-