org.jete.validator
Class ThrowableValidator

java.lang.Object
  extended byorg.jete.validator.ThrowableValidator
All Implemented Interfaces:
Validator

public class ThrowableValidator
extends java.lang.Object
implements Validator

Validate expected exceptions / throwable with this validator. Supply the expected throwable name and message, and a ValidatedTestAction will set this information if an exception is thrown.

The necessary exception may be buried in a stack trace, so the validator will continue through the causes until the sought after exception is found.

Version:
$Id: ThrowableValidator.html,v 1.2 2006/03/12 02:47:07 tdeast Exp $

Constructor Summary
ThrowableValidator()
           
ThrowableValidator(java.lang.String throwableName, java.lang.String message)
           
 
Method Summary
 java.lang.String getMessage()
           
 java.lang.Throwable getThrowable()
           
 java.lang.String getThrowableName()
           
 void setMessage(java.lang.String message)
           
 void setThrowable(java.lang.Throwable throwable)
           
 void setThrowableName(java.lang.String throwableName)
           
 void validate(TestAction action)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrowableValidator

public ThrowableValidator()

ThrowableValidator

public ThrowableValidator(java.lang.String throwableName,
                          java.lang.String message)
Method Detail

validate

public void validate(TestAction action)
Specified by:
validate in interface Validator

getThrowableName

public java.lang.String getThrowableName()

setThrowableName

public void setThrowableName(java.lang.String throwableName)

getMessage

public java.lang.String getMessage()

setMessage

public void setMessage(java.lang.String message)

getThrowable

public java.lang.Throwable getThrowable()

setThrowable

public void setThrowable(java.lang.Throwable throwable)