net.sourceforge.sqlunit.handlers
Class SeverityHandler

java.lang.Object
  extended by net.sourceforge.sqlunit.handlers.SeverityHandler
All Implemented Interfaces:
IHandler

public class SeverityHandler
extends java.lang.Object
implements IHandler

The SeverityHandler processes the contents of the Severity tag in the input XML file. It decides whether the test's severity is equal or greater that a user-defined severity, which we will called the threshold severity. The decision is made following these rules:

  1. If the current test's severity tag is not present or is empty, the the test matches and is executed;
  2. The threshold severity is retrieved as well as the content of the current test's severity tag and the two values are compared. If the current test's severity is lower than the threshold severity, the test is skipped and is reported as skipped; if not it is executed.
The threshold severity is provided in one of the following ways, sorted by priority:

Version:
$Revision: 1.3 $
Author:
Ivan Ivanov

Constructor Summary
SeverityHandler()
           
 
Method Summary
 java.lang.Object process(org.jdom.Element elSeverity)
          Processes the Severity JDOM Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeverityHandler

public SeverityHandler()
Method Detail

process

public java.lang.Object process(org.jdom.Element elSeverity)
                         throws java.lang.Exception
Processes the Severity JDOM Element. Returns Boolean.TRUE if the severity matches the specified severity threshhold.

Specified by:
process in interface IHandler
Parameters:
elSeverity - the JDOM Element representing the severity tag.
Returns:
a Boolean.TRUE or FALSE. Caller must cast appropriately.
Throws:
java.lang.Exception - if there was a problem processing the element.