Class DiffCollectingFailureHandler

java.lang.Object
org.dbunit.assertion.DefaultFailureHandler
org.dbunit.assertion.DiffCollectingFailureHandler
All Implemented Interfaces:
DifferenceListener, FailureFactory, FailureHandler

public class DiffCollectingFailureHandler extends DefaultFailureHandler
A FailureHandler that collects the Differences that were found without throwing an exception.

You can use it as follows:

 IDataSet dataSet = getDataSet();
 DiffCollectingFailureHandler myHandler = new DiffCollectingFailureHandler();
 //invoke the assertion with the custom handler
 assertion.assertEquals(dataSet.getTable("TEST_TABLE"),
                        dataSet.getTable("TEST_TABLE_WITH_WRONG_VALUE"),
                        myHandler);
 // Evaluate the results
 List diffList = myHandler.getDiffList();
 Difference diff = (Difference)diffList.get(0);
 ...
 
Since:
2.4.0
Version:
$Revision$ $Date$
Author:
gommma (gommma AT users.sourceforge.net), Last changed by: $Author$