Compatible with Servlet 2.5 as well as Servlet 3.0. @author Juergen Hoeller @author Rod Johnson @since 1.0.2
Mock implementation of an HttpServletResponse. Captures any output is written along with any headers, status information etc. and makes it available through various getter methods.
Of major note is the fact that none of the setStatus(), sendError() or sendRedirect() methods have any real effect on the request processing lifecycle. Information is recorded so it can be verified what was invoked, but that is all.
@author Tim Fennell @since Stripes 1.1.1Mock implementation of HttpServletResponse
.
Mock implementation of HttpServletResponse
.
Mock HttpServletResponse object for low-level unit tests of Struts controller components. Coarser grained tests should be implemented in terms of the Cactus framework, instead of the mock object classes.
WARNING - Only the minimal set of methods needed to create unit tests is provided, plus additional methods to configure this object as necessary. Methods for unsupported operations will throw UnsupportedOperationException
.
WARNING - Because unit tests operate in a single threaded environment, no synchronization is performed.
@version $Rev: 421119 $ $Date: 2005-05-07 12:11:38 -0400 (Sat, 07 May 2005)$Used for testing the web framework; also useful for testing application controllers. @author Juergen Hoeller @author Rod Johnson @since 1.0.2
As of Spring 4.0, this set of mocks is designed on a Servlet 3.0 baseline. Beyond that, {@code MockHttpServletResponse} is also compatible with Servlet3.1's {@code setContentLengthLong()} method. @author Juergen Hoeller @author Rod Johnson @since 1.0.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|