org.codehaus.xfire.test
Class AbstractServletTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.xfire.test.AbstractXFireTest
              extended by org.codehaus.xfire.test.AbstractServletTest
All Implemented Interfaces:
junit.framework.Test

public abstract class AbstractServletTest
extends AbstractXFireTest

A generic test-case for testing servlets.

Since:
May 4, 2003
Author:
Dan Diephouse

Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.xfire.test.AbstractXFireTest
AbstractXFireTest.CopySerializer
 
Field Summary
protected  com.meterware.servletunit.ServletRunner sr
           
 
Fields inherited from class org.codehaus.xfire.test.AbstractXFireTest
RESPONSE
 
Constructor Summary
AbstractServletTest()
           
 
Method Summary
protected  void expectErrorCode(com.meterware.httpunit.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  com.meterware.servletunit.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, invokeService, printNode, printNode, readDocument, readDocument, setServiceFactory, stringNode, stringNode, 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, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sr

protected com.meterware.servletunit.ServletRunner sr
Constructor Detail

AbstractServletTest

public AbstractServletTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class AbstractXFireTest
Throws:
java.lang.Exception
See Also:
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 com.meterware.servletunit.ServletUnitClient newClient()

expectErrorCode

protected void expectErrorCode(com.meterware.httpunit.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-2008. All Rights Reserved.