Package com.meterware.pseudoserver
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 void
addResourceHeader
(String resourceName, String header) protected String
protected void
assertEqualQueries
(String query1, String query2) protected void
assertEquals
(String comment, byte[] expected, byte[] actual) protected void
assertEquals
(String comment, Object[] expected, Object[] found) protected void
assertImplement
(String comment, Object[] objects, Class expectedClass) protected void
assertImplements
(String comment, Object object, Class expectedClass) static void
assertMatchingSet
(String comment, Object[] expected, Object[] found) protected void
assertMatchingSet
(String comment, Object[] expected, Enumeration found) static String
protected void
defineResource
(String resourceName, byte[] value, String contentType) protected void
defineResource
(String resourceName, PseudoServlet servlet) protected void
defineResource
(String resourceName, String value) protected void
defineResource
(String resourceName, String value, int statusCode) protected void
defineResource
(String resourceName, String value, String contentType) protected void
defineWebPage
(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 void
defineWebPage
(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 String
protected int
protected PseudoServer
protected void
mapToClasspath
(String directory) protected void
setResourceCharSet
(String resourceName, String setName, boolean reportCharSet) protected void
setServerDebug
(boolean enabled) void
setUp()
void
tearDown()
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
Methods 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
- Overrides:
setUp
in classjunit.framework.TestCase
- Throws:
Exception
-
tearDown
- Overrides:
tearDown
in classjunit.framework.TestCase
- Throws:
Exception
-
defineResource
-
defineResource
-
defineResource
-
defineResource
-
defineResource
-
addResourceHeader
-
setResourceCharSet
-
defineWebPage
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 null- Parameters:
xmlns
-pageName
-body
-
-
defineWebPage
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- Parameters:
pageName
-body
-
-
mapToClasspath
-
getServer
-
setServerDebug
protected void setServerDebug(boolean enabled) -
getHostPath
-
getHostPort
- Throws:
IOException
-
assertEqualQueries
-
assertEquals
-
assertImplement
-
assertImplements
-
assertMatchingSet
-
assertMatchingSet
-
asText
-
asBytes
-
assertEquals
-