|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mockrunner.base.WebTestModule
public abstract class WebTestModule
This class provides some convenience methods for request and session attribute handling
| Constructor Summary | |
|---|---|
WebTestModule(WebMockObjectFactory mockFactory)
|
|
| Method Summary | |
|---|---|
void |
addRequestParameter(java.lang.String key)
Adds an empty request parameter. |
void |
addRequestParameter(java.lang.String key,
java.lang.String value)
Adds a request parameter. |
void |
addRequestParameter(java.lang.String key,
java.lang.String[] values)
Adds several request parameters. |
java.lang.Object |
getRequestAttribute(java.lang.String key)
Returns the request attribute for the specified key |
java.lang.String |
getRequestParameter(java.lang.String key)
Returns the request parameter for the specified key |
java.lang.Object |
getSessionAttribute(java.lang.String key)
Returns the session attribute for the specified key |
void |
setRequestAttribute(java.lang.String key,
java.lang.Object value)
Sets the request attribute for the specified key |
void |
setSessionAttribute(java.lang.String key,
java.lang.Object value)
Sets the session attribute for the specified key |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebTestModule(WebMockObjectFactory mockFactory)
| Method Detail |
|---|
public void addRequestParameter(java.lang.String key)
addRequestParameter(key, "").
key - the request key
public void addRequestParameter(java.lang.String key,
java.lang.String value)
key - the request keyvalue - the request value
public void addRequestParameter(java.lang.String key,
java.lang.String[] values)
key - thevalues - the request valuespublic java.lang.String getRequestParameter(java.lang.String key)
key - the request key
public java.lang.Object getRequestAttribute(java.lang.String key)
key - the request key
public void setRequestAttribute(java.lang.String key,
java.lang.Object value)
key - the request keyvalue - the valuepublic java.lang.Object getSessionAttribute(java.lang.String key)
key - the session key
public void setSessionAttribute(java.lang.String key,
java.lang.Object value)
key - the session keyvalue - the value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||