org.apache.cxf.testsupport
Class AbstractServletTest

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.cxf.test.AbstractCXFTest
          extended by org.apache.cxf.testsupport.AbstractServletTest

public abstract class AbstractServletTest
extends org.apache.cxf.test.AbstractCXFTest


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.cxf.test.AbstractCXFTest
org.apache.cxf.test.AbstractCXFTest.TestMessageObserver
 
Field Summary
static String CONTEXT
           
static String CONTEXT_URL
           
protected  com.meterware.servletunit.ServletRunner sr
           
 
Fields inherited from class org.apache.cxf.test.AbstractCXFTest
bus, testUtilities
 
Constructor Summary
AbstractServletTest()
           
 
Method Summary
protected  void expectErrorCode(com.meterware.httpunit.WebRequest request, int errorCode, String errorText)
          Here we expect an errorCode other than 200, and look for it checking for text is omitted as it doesnt work.
protected  String getConfiguration()
           
protected  com.meterware.servletunit.ServletUnitClient newClient()
           
 void setUp()
           
 
Methods inherited from class org.apache.cxf.test.AbstractCXFTest
addNamespace, assertInvalid, assertNoFault, assertValid, assertValidBoolean, assertXPathEquals, createBus, getBasedir, getBus, getNamespaceContext, getNamespaces, getResourceAsReader, getResourceAsStream, getTestFile, getWSDLDocument, invoke, invoke, invokeBytes, setUpBus, shutdownBus
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT

public static final String CONTEXT
See Also:
Constant Field Values

CONTEXT_URL

public static final String CONTEXT_URL
See Also:
Constant Field Values

sr

protected com.meterware.servletunit.ServletRunner sr
Constructor Detail

AbstractServletTest

public AbstractServletTest()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

getConfiguration

protected String getConfiguration()
Returns:
The web.xml to use for testing.

newClient

protected com.meterware.servletunit.ServletUnitClient newClient()

expectErrorCode

protected void expectErrorCode(com.meterware.httpunit.WebRequest request,
                               int errorCode,
                               String errorText)
                        throws MalformedURLException,
                               IOException,
                               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:
MalformedURLException
IOException
SAXException


Apache CXF