com.canoo.webtest.engine
Class ContextHelper
java.lang.Object
com.canoo.webtest.engine.ContextHelper
public final class ContextHelper
- extends Object
Utility class for Context.
|
Method Summary |
static void |
defineAsCurrentResponse(Context context,
byte[] responseBytes,
String contentType,
String urlStr)
|
static void |
defineAsCurrentResponse(Context context,
String responseText,
String contentType,
Class clazz)
|
static void |
defineAsCurrentResponse(Context context,
String responseText,
String contentType,
String urlStr)
|
static File |
writeResponseFile(com.gargoylesoftware.htmlunit.WebResponse response,
File file)
Writes the response to the file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextHelper
public ContextHelper()
writeResponseFile
public static File writeResponseFile(com.gargoylesoftware.htmlunit.WebResponse response,
File file)
- Writes the response to the file. If an error occurs, just logs it and returns
null.
- Parameters:
response - the response to writefile - the file to write in
- Returns:
- file if everything works fine,
null if an error occured.
defineAsCurrentResponse
public static void defineAsCurrentResponse(Context context,
byte[] responseBytes,
String contentType,
String urlStr)
- Parameters:
context - responseBytes - contentType - urlStr -
defineAsCurrentResponse
public static void defineAsCurrentResponse(Context context,
String responseText,
String contentType,
String urlStr)
- Parameters:
context - responseText - contentType - urlStr -
defineAsCurrentResponse
public static void defineAsCurrentResponse(Context context,
String responseText,
String contentType,
Class clazz)
- Parameters:
context - responseText - contentType - urlStr -