org.codehaus.xfire.test
Class AbstractServletTest
java.lang.Object
TestCase
org.codehaus.xfire.test.AbstractXFireTest
org.codehaus.xfire.test.AbstractServletTest
public abstract class AbstractServletTest
- extends AbstractXFireTest
A generic test-case for testing servlets.
- Since:
- May 4, 2003
- Author:
- Dan Diephouse
Field Summary |
protected ServletRunner |
sr
|
Method Summary |
protected void |
expectErrorCode(WebRequest request,
int errorCode,
java.lang.String errorText)
Here we expect an errorCode other than 200, and look for it
checking for text is omitted as it doesnt work. |
protected java.lang.String |
getConfiguration()
|
protected XFire |
getXFire()
|
protected ServletUnitClient |
newClient()
|
void |
setUp()
|
Methods inherited from class org.codehaus.xfire.test.AbstractXFireTest |
addNamespace, assertInvalid, assertNoFault, assertValid, assertXPathEquals, createSession, getBasedir, getResourceAsReader, getResourceAsStream, getServiceFactory, getServiceRegistry, getSession, getTestFile, getTransportManager, getWSDL, getWSDLDocument, getXFireProxyFactory, invokeService, invokeService, printNode, readDocument, readDocument, setServiceFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sr
protected ServletRunner sr
AbstractServletTest
public AbstractServletTest()
setUp
public void setUp()
throws java.lang.Exception
- Overrides:
setUp
in class AbstractXFireTest
- Throws:
java.lang.Exception
- See Also:
junit.framework.TestCase#setUp()
getConfiguration
protected java.lang.String getConfiguration()
- Returns:
- The web.xml to use for testing.
getXFire
protected XFire getXFire()
- Overrides:
getXFire
in class AbstractXFireTest
newClient
protected ServletUnitClient newClient()
expectErrorCode
protected void expectErrorCode(WebRequest request,
int errorCode,
java.lang.String errorText)
throws java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException
- Here we expect an errorCode other than 200, and look for it
checking for text is omitted as it doesnt work. It would never work on
java1.3, but one may have expected java1.4+ to have access to the
error stream in responses. Clearly not.
- Parameters:
request
- errorCode
- errorText
- optional text string to search for
- Throws:
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
Copyright © 2004-2006 Envoi Solutions LLC. All Rights Reserved.