|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springunit.framework.SpringUnitContext<T>
public class SpringUnitContext<T>
A bean that holds data for a single SpringUnitTest.
The bean contains a single attribute, data,
that is a map of strings to objects. The string keys
are either the names of tests or arbitrary identifiers
for data values. For keys that name tests,
the corresponding value is itself a map of string keys
to object values.
| Constructor Summary | |
|---|---|
SpringUnitContext()
|
|
| Method Summary | |
|---|---|
Map<? extends String,? extends T> |
getData()
Test data values associated with a TestCase. |
T |
getObject(String key,
String fName)
Find the data value identified by key,
searching first in the scope of the name
of the test (fName), then outward
until found or null is returned. |
protected T |
getObject(String key,
String fName,
Map<? extends String,? extends T> map)
Find the data value identified by key
in the map by searching first
in the scope of the test (fName). |
void |
setData(Map<? extends String,? extends T> data)
Make data the test data values
associcated with TestCase. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringUnitContext()
| Method Detail |
|---|
public Map<? extends String,? extends T> getData()
public T getObject(String key,
String fName)
key,
searching first in the scope of the name
of the test (fName), then outward
until found or null is returned.
key - Identifier of data value to be foundfName - Name of test in whose scope search
should begin
public void setData(Map<? extends String,? extends T> data)
data the test data values
associcated with TestCase.
data - Data values indexed by string names
protected T getObject(String key,
String fName,
Map<? extends String,? extends T> map)
key
in the map by searching first
in the scope of the test (fName).
If fName is the name of a map
testMap
contained in map, then return
the value in testMap associated
with key. If there is no
value in testMap associated with
key, then return the value
associated with key in map,
which could be null.
key - Identifier of data valuefName - Identifier of test; must exactly match
the name of a test procedure in a SpringUnitTest.map - Map of string identifiers to objects
where the string is either an fName or a key
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||