Class ServletWebContextTestCase
java.lang.Object
org.apache.commons.chain.ContextTestCase<ServletWebContext>
org.apache.commons.chain.web.ContextBaseTestWeb<ServletWebContext>
org.apache.commons.chain.web.javax.servlet.ServletWebContextTestCase
Extension of
ContextBaseTestCase to validate the
extra functionality of this implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected javax.servlet.http.HttpServletRequestServlet API Objects - Requestprotected javax.servlet.http.HttpServletResponseServlet API Objects - Responseprotected javax.servlet.ServletContextServlet API Objects - Contextprotected javax.servlet.http.HttpSessionServlet API Objects - SessionFields inherited from class org.apache.commons.chain.ContextTestCase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckEntrySet(Map<String, ?> map, boolean modifiable) Test to ensure proper entrySet() and are modifiable optionallyprotected voidcheckMapSize(Map<String, ?> map, int size) protected ServletWebContextCreate a new instance of the appropriate Context type for this test casevoidinit()Set up instance variables required by this test case.voidtearDown()Tear down instance variables required by this test case.voidTestgetApplicationScope()voidTestgetCookies()voidTestequals()andhashCode()Copied from ContextBaseTestCase with customized creation of "other"voidTestgetHeader()voidTestgetHeaderValues()voidTestgetInitParam()voidTestgetParam()voidTestgetParamValues()voidTest state of newly created instancevoidTestrelease()voidTestgetRequestScope()voidTestgetSessionScope()voidTestgetSessionScope()without SessionMethods inherited from class org.apache.commons.chain.web.ContextBaseTestWeb
testSerializationMethods 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:
initin classContextTestCase<ServletWebContext>
-
tearDown
Tear down instance variables required by this test case.- Overrides:
tearDownin classContextTestCase<ServletWebContext>
-
testApplicationScope
TestgetApplicationScope() -
testEquals
Testequals()andhashCode()Copied from ContextBaseTestCase with customized creation of "other"- Overrides:
testEqualsin classContextTestCase<ServletWebContext>
-
testHeader
TestgetHeader() -
testHeaderValues
TestgetHeaderValues() -
testInitParam
TestgetInitParam() -
testParam
TestgetParam() -
testParamValues
TestgetParamValues() -
testCookies
TestgetCookies() -
testPristine
Test state of newly created instance- Overrides:
testPristinein 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-trueif map is modifiable
-
createContext
Create a new instance of the appropriate Context type for this test case- Specified by:
createContextin classContextTestCase<ServletWebContext>- Returns:
- a new instance of the appropriate Context type
-