Simulates a conversation between a web browser and a servlet container.
Cookies will be remembered between requests and can be easily examined.
To check which new cookies have been set during a request, the
MockResponse.getNewCookieNames method can be used.
An instance of this class is tied to a regular
Site structure
instance. Your tests can thus reference existing site XML declarations,
combine different sites into one, build a new site-structure on-the-fly in
Java, modify existing element declarations, override property injections,
...
Note that RIFE relies on
com.uwyn.rife.engine.EngineClassLoader to provide continuations functionalities to pure Java elements. If you want
to test elements that use continuations, you have to make sure the first
class in your test setup is loaded by
com.uwyn.rife.engine.EngineClassLoader . The easiest way to do so is to run
your main class with
RunWithEngineClassLoader .
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3634 $ since: 1.1
Note that when the complete URL form is used, it should correspond
to the scheme, hostname and port configuration of this conversation.
Parameters: url - the url that should be tested Parameters: request - the request that will be used the response of the request as a MockResponse instance;or