org.apache.tapestry.junit.mock
Class TestMockApplications
java.lang.Object
org.apache.tapestry.junit.mock.TestMockApplications
public class TestMockApplications
- extends Object
A complex class that reads an XML description of a test involving the Mock objects and executes
it, pretending to be a running servlet container.
The XML format is pretty simple, it contains declarations similar to a web.xml deployment
descriptor, a description of the active HttpSession (if any), a description of the HttpRequest,
and then a set of expectations for the output stream from the request.
- Since:
- 2.2
- Author:
- Howard Lewis Ship
LOGS_DIR
public static final String LOGS_DIR
- See Also:
- Constant Field Values
DEFAULT_BASE_DIR
public static final String DEFAULT_BASE_DIR
- See Also:
- Constant Field Values
SCRIPTS_DIR
public static final String SCRIPTS_DIR
- See Also:
- Constant Field Values
TestMockApplications
public TestMockApplications()
tearDown
public void tearDown()
throws Exception
- Closes System.out and System.err, then restores them to their original values.
- Throws:
Exception
createTestParameters
public Object[][] createTestParameters()
toString
public String toString()
- Overrides:
toString
in class Object
execute
public void execute(String testRootDirectory,
String path,
String fileName)
throws Exception
- Invoked to execute the request cycle.
- Throws:
Exception
getContext
public MockContext getContext()
getRequest
public MockRequest getRequest()
getResponse
public MockResponse getResponse()
getServlet
public ApplicationServlet getServlet()
deleteDir
public static void deleteDir()
getBaseDirectory
public static String getBaseDirectory()
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.