com.meterware.pseudoserver

Class HttpUserAgentTest

public class HttpUserAgentTest extends TestCase

A base class for test cases that use the pseudo server.

Author: Russell Gold

Constructor Summary
HttpUserAgentTest(String name)
Method Summary
protected voidaddResourceHeader(String resourceName, String header)
protected StringasBytes(String s)
protected voidassertEqualQueries(String query1, String query2)
protected voidassertEquals(String comment, Object[] expected, Object[] found)
protected voidassertEquals(String comment, byte[] expected, byte[] actual)
protected voidassertImplement(String comment, Object[] objects, Class expectedClass)
protected voidassertImplements(String comment, Object object, Class expectedClass)
protected voidassertMatchingSet(String comment, Object[] expected, Enumeration found)
static voidassertMatchingSet(String comment, Object[] expected, Object[] found)
static StringasText(Object[] args)
protected voiddefineResource(String resourceName, PseudoServlet servlet)
protected voiddefineResource(String resourceName, String value)
protected voiddefineResource(String resourceName, byte[] value, String contentType)
protected voiddefineResource(String resourceName, String value, int statusCode)
protected voiddefineResource(String resourceName, String value, String contentType)
protected voiddefineWebPage(String pageName, String body)
protected StringgetHostPath()
protected intgetHostPort()
protected PseudoServergetServer()
protected voidmapToClasspath(String directory)
protected voidsetResourceCharSet(String resourceName, String setName, boolean reportCharSet)
protected voidsetServerDebug(boolean enabled)
voidsetUp()
voidtearDown()

Constructor Detail

HttpUserAgentTest

public HttpUserAgentTest(String name)

Method Detail

addResourceHeader

protected void addResourceHeader(String resourceName, String header)

asBytes

protected String asBytes(String s)

assertEqualQueries

protected void assertEqualQueries(String query1, String query2)

assertEquals

protected void assertEquals(String comment, Object[] expected, Object[] found)

assertEquals

protected void assertEquals(String comment, byte[] expected, byte[] actual)

assertImplement

protected void assertImplement(String comment, Object[] objects, Class expectedClass)

assertImplements

protected void assertImplements(String comment, Object object, Class expectedClass)

assertMatchingSet

protected void assertMatchingSet(String comment, Object[] expected, Enumeration found)

assertMatchingSet

public static void assertMatchingSet(String comment, Object[] expected, Object[] found)

asText

public static String asText(Object[] args)

defineResource

protected void defineResource(String resourceName, PseudoServlet servlet)

defineResource

protected void defineResource(String resourceName, String value)

defineResource

protected void defineResource(String resourceName, byte[] value, String contentType)

defineResource

protected void defineResource(String resourceName, String value, int statusCode)

defineResource

protected void defineResource(String resourceName, String value, String contentType)

defineWebPage

protected void defineWebPage(String pageName, String body)

getHostPath

protected String getHostPath()

getHostPort

protected int getHostPort()

getServer

protected PseudoServer getServer()

mapToClasspath

protected void mapToClasspath(String directory)

setResourceCharSet

protected void setResourceCharSet(String resourceName, String setName, boolean reportCharSet)

setServerDebug

protected void setServerDebug(boolean enabled)

setUp

public void setUp()

tearDown

public void tearDown()