net.sourceforge.sqlunit.handlers
Class DiffHandler

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

public class DiffHandler
extends java.lang.Object
implements IHandler

The DiffHandler compares result sets from two different SQL statements or stored procedure calls. The caller does not need to know or specify the exact results returned from each SQL or stored procedure call. This can be used when comparing the output of two queries which are too large or unknown at test specification time.

Version:
$Revision: 1.9 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
DiffHandler()
           
 
Method Summary
 java.lang.Object process(org.jdom.Element elDiff)
          Collects the stored procedures and SQL statements specified and runs them in a batch, matching with the specified results with the same id attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffHandler

public DiffHandler()
Method Detail

process

public final java.lang.Object process(org.jdom.Element elDiff)
                               throws java.lang.Exception
Collects the stored procedures and SQL statements specified and runs them in a batch, matching with the specified results with the same id attribute. If a failure occurs, the entire batch is rolled back. This behavior of this handler is largely identical to the behavior of the Test handler.

Specified by:
process in interface IHandler
Parameters:
elDiff - the JDOM Element representing the batchtest tag.
Returns:
Boolean.TRUE if the diff succeeded, else Boolean.FALSE.
Throws:
java.lang.Exception - if there was a problem running the process.