atg.servlet
Class ServletTestUtils

java.lang.Object
  extended by atg.servlet.ServletTestUtils

public class ServletTestUtils
extends java.lang.Object

Utility methods for setting up Servlet based tests.

Author:
Adam Belmont

Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
ServletTestUtils()
           
 
Method Summary
 TestingDynamoHttpServletRequest createDynamoHttpServletRequest(java.util.Map<java.lang.String,java.lang.String> pParameters, int pBufferSize, java.lang.String pMethod)
          Creates a new DynamoHtttpServletRequest object that can be used in a unit test.
 atg.servlet.DynamoHttpServletResponse createDynamoHttpServletResponse()
          Deprecated. Use the version that takes a TestingDynamoHttpServletRequest parameter
 TestingDynamoHttpServletResponse createDynamoHttpServletResponse(TestingDynamoHttpServletRequest pRequest)
          Creates a new DynamoHtttpServletResponse object that can be used in a unit test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Constructor Detail

ServletTestUtils

public ServletTestUtils()
Method Detail

createDynamoHttpServletRequest

public TestingDynamoHttpServletRequest createDynamoHttpServletRequest(java.util.Map<java.lang.String,java.lang.String> pParameters,
                                                                      int pBufferSize,
                                                                      java.lang.String pMethod)
Creates a new DynamoHtttpServletRequest object that can be used in a unit test. The request is setup with an InputStream, OutputStream and the given set of request parameters.

Parameters:
pParmeters - A set of request parameters that this request should initially be populated with
pBufferSize - The size in bytes of the backing buffer holding stream data for this request
pMethod - The HTTP method for this request. For example GET,POST,PUT

createDynamoHttpServletResponse

public atg.servlet.DynamoHttpServletResponse createDynamoHttpServletResponse()
Deprecated. Use the version that takes a TestingDynamoHttpServletRequest parameter

Creates a new DynamoHtttpServletResponse object that can be used in a unit test.


createDynamoHttpServletResponse

public TestingDynamoHttpServletResponse createDynamoHttpServletResponse(TestingDynamoHttpServletRequest pRequest)
Creates a new DynamoHtttpServletResponse object that can be used in a unit test.



Copyright © 2009. All Rights Reserved.