org.codehaus.xfire.test
Class AbstractServletTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.codehaus.xfire.test.AbstractXFireTest
              extended byorg.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

Field Summary
protected  com.meterware.servletunit.ServletRunner sr
           
 
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, printNode, printNode, readDocument, readDocument, setServiceFactory
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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
 
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-2006 null. All Rights Reserved.