Class HttpUserAgentTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.meterware.pseudoserver.HttpUserAgentTest
- All Implemented Interfaces:
junit.framework.Test
public class HttpUserAgentTest
extends junit.framework.TestCase
A base class for test cases that use the pseudo server.
- Author:
- Russell Gold
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddResourceHeader(String resourceName, String header) protected Stringprotected voidassertEqualQueries(String query1, String query2) protected voidassertEquals(String comment, byte[] expected, byte[] actual) protected voidassertEquals(String comment, Object[] expected, Object[] found) protected voidassertImplement(String comment, Object[] objects, Class expectedClass) protected voidassertImplements(String comment, Object object, Class expectedClass) static voidassertMatchingSet(String comment, Object[] expected, Object[] found) protected voidassertMatchingSet(String comment, Object[] expected, Enumeration found) static Stringprotected voiddefineResource(String resourceName, byte[] value, String contentType) protected voiddefineResource(String resourceName, PseudoServlet servlet) protected voiddefineResource(String resourceName, String value) protected voiddefineResource(String resourceName, String value, int statusCode) protected voiddefineResource(String resourceName, String value, String contentType) protected voiddefineWebPage(String pageName, String body) define a Web Page with the given page name and boy adding the html and body tags with pageName as the title of the pageprotected voiddefineWebPage(String xmlns, String pageName, String body) define a Web Page with the given page name and boy adding the html and body tags with pageName as the title of the page use the given xml names space if it is not nullprotected Stringprotected intprotected PseudoServerprotected voidmapToClasspath(String directory) protected voidsetResourceCharSet(String resourceName, String setName, boolean reportCharSet) protected voidsetServerDebug(boolean enabled) voidsetUp()voidtearDown()Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toStringMethods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
-
Constructor Details
-
HttpUserAgentTest
-
-
Method Details
-
setUp
-
tearDown
-
defineResource
-
defineResource
-
defineResource
-
defineResource
-
defineResource
-
addResourceHeader
-
setResourceCharSet
-
defineWebPage
-
defineWebPage
-
mapToClasspath
-
getServer
-
setServerDebug
protected void setServerDebug(boolean enabled) -
getHostPath
-
getHostPort
- Throws:
IOException
-
assertEqualQueries
-
assertEquals
-
assertImplement
-
assertImplements
-
assertMatchingSet
-
assertMatchingSet
-
asText
-
asBytes
-
assertEquals
-