Package org.apache.commons.chain
Class ContextTestCase<C extends Context>
java.lang.Object
org.apache.commons.chain.ContextTestCase<C>
- Direct Known Subclasses:
ContextBaseTestCase
,ContextBaseTestWeb
,TestContextTestCase
Test case for the
ContextBase
class.- Version:
- $Revision$ $Date$
- Author:
- Craig R. McClanahan
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkAttributeCount
(int expected) Verify the number of defined attributesprotected abstract C
Create a new instance of the appropriate Context type for this test caseprotected int
Return the expectedsize()
for a Context 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
Test ability to get, put, and remove attributesvoid
TestcontainsKey()
andcontainsValue()
void
Testequals()
andhashCode()
void
TestkeySet()
void
Test state of newly created instancevoid
TestputAll()
void
Test serialization
-
Field Details
-
context
TheContext
instance under test.
-
-
Constructor Details
-
ContextTestCase
public ContextTestCase()The Default-Constructor for this class.
-
-
Method Details
-
init
Set up instance variables required by this test case. -
tearDown
Tear down instance variables required by this test case. -
testAttributes
Test ability to get, put, and remove attributes -
testContains
TestcontainsKey()
andcontainsValue()
-
testEquals
Testequals()
andhashCode()
-
testKeySet
TestkeySet()
-
testPristine
Test state of newly created instance -
testPutAll
TestputAll()
-
testSerialization
Test serialization- Throws:
Exception
- any error
-
checkAttributeCount
Verify the number of defined attributes- Parameters:
expected
- the expected value
-
expectedAttributeCount
Return the expectedsize()
for a Context for this test case- Returns:
- the expected
size()
for a Context
-
createContext
Create a new instance of the appropriate Context type for this test case- Returns:
- the new instance of the appropriate Context type
-