org.apache.cactus
class WebTestResult
java.lang.Object
|
+--org.apache.cactus.WebTestResult
- public class WebTestResult
- extends java.lang.Object
Represent the result of the execution of the Test class by the
server redirector.If any exception was raised during the test, it
is saved by this class.
- Version:
- $Id: WebTestResult.java,v 1.2 2002/04/21 12:45:44 vmassol Exp $
- Author:
- Vincent Massol
Constructor Summary |
WebTestResult()
Constructor to call when the test was ok and no error was raised. |
WebTestResult(Throwable theException)
Constructor to call when an exception was raised during the test. |
WebTestResult(String theClassName,
String theMessage,
String theStackTrace)
Constructor used to reconstruct a WebTestResult object from its String
representation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
XML_EXCEPTION_CLASSNAME_ATTRIBUTE
public static final String XML_EXCEPTION_CLASSNAME_ATTRIBUTE
- Name of Exception XML attribute that contains the exception classname
(see
toXml()
).
XML_EXCEPTION_ELEMENT
public static final String XML_EXCEPTION_ELEMENT
- Name of Exception XML tag (see
toXml()
).
XML_EXCEPTION_MESSAGE_ELEMENT
public static final String XML_EXCEPTION_MESSAGE_ELEMENT
- Name of Exception Message XML tag (see
toXml()
).
XML_EXCEPTION_STACKTRACE_ELEMENT
public static final String XML_EXCEPTION_STACKTRACE_ELEMENT
- Name of Exception Stacktrace XML tag (see
toXml()
).
XML_ROOT_ELEMENT
public static final String XML_ROOT_ELEMENT
- Name of Root XML tag (see
toXml()
).
WebTestResult
public WebTestResult()
- Constructor to call when the test was ok and no error was raised.
WebTestResult
public WebTestResult(Throwable theException)
- Constructor to call when an exception was raised during the test.
- Parameters:
theException
- the raised exception.
WebTestResult
public WebTestResult(String theClassName,
String theMessage,
String theStackTrace)
- Constructor used to reconstruct a WebTestResult object from its String
representation.
- Parameters:
theClassName
- the class name of the exception thrown on the server
side
theMessage
- the message of the exception thrown on the server side
theStackTrace
- the stack trace of the exception thrown on the
server side
getExceptionClassName
public String getExceptionClassName()
- Returns:
- the exception class name if an exception was raised or
null
otherwise.
getExceptionMessage
public String getExceptionMessage()
- Returns:
- the exception message if an exception was raised or
null
otherwise.
getExceptionStackTrace
public String getExceptionStackTrace()
- Returns:
- the stack trace as a string
hasException
public boolean hasException()
- Returns:
- true if an exception was raised during the test, false otherwise.
toString
public String toString()
- See Also:
Object.toString()
toXml
public String toXml()
- Returns:
- an XML representation of the test result to be sent in the
HTTP response to the Cactus client.
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.