org.apache.cactus.server
Class ServletTestCaller

java.lang.Object
  extended byorg.apache.cactus.server.AbstractWebTestCaller
      extended byorg.apache.cactus.server.ServletTestCaller
Direct Known Subclasses:
JspTestCaller

public class ServletTestCaller
extends AbstractWebTestCaller

Responsible for instanciating the TestCase class on the server side, set up the implicit objects and call the test method.

Version:
$Id: ServletTestCaller.java,v 1.13 2003/07/12 19:40:14 vmassol Exp $
Author:
Vincent Massol

Field Summary
 
Fields inherited from class org.apache.cactus.server.AbstractWebTestCaller
TEST_RESULTS, webImplicitObjects
 
Constructor Summary
ServletTestCaller(ServletImplicitObjects theObjects)
           
 
Method Summary
protected  java.io.Writer getResponseWriter()
           
protected  void setTestCaseFields(junit.framework.TestCase theTestInstance)
          Sets the implicit object in the test case class
 
Methods inherited from class org.apache.cactus.server.AbstractWebTestCaller
doCreateSession, doGetResults, doGetVersion, doRunTest, doTest, getTestClassClass, getTestClassInstance, getTestClassName, getTestMethodName, getWrappedTestClassName, isAutoSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletTestCaller

public ServletTestCaller(ServletImplicitObjects theObjects)
Parameters:
theObjects - the implicit objects coming from the redirector
Method Detail

setTestCaseFields

protected void setTestCaseFields(junit.framework.TestCase theTestInstance)
                          throws java.lang.Exception
Description copied from class: AbstractWebTestCaller
Sets the implicit object in the test case class

Specified by:
setTestCaseFields in class AbstractWebTestCaller
Parameters:
theTestInstance - the instance of the test case class on which the class variable (implicit objects) should be set
Throws:
java.lang.Exception - if an errors occurs when setting the implicit objects
See Also:
AbstractWebTestCaller.setTestCaseFields(TestCase)

getResponseWriter

protected java.io.Writer getResponseWriter()
                                    throws java.io.IOException
Specified by:
getResponseWriter in class AbstractWebTestCaller
Returns:
a Writer object that will be used to return the test result to the client side.
Throws:
java.io.IOException - if an error occurs when retrieving the writer
See Also:
AbstractWebTestCaller.getResponseWriter()


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.