Package org.dbunit.assertion
Class Difference
java.lang.Object
org.dbunit.assertion.Difference
Value object to hold the difference of a single data cell found while
comparing data.
Inspired by the XMLUnit framework.
- Since:
- 2.4.0, 2.6.0 added failMessage
- Version:
- $Revision$ $Date$
- Author:
- gommma (gommma AT users.sourceforge.net), Last changed by: $Author$
-
Constructor Summary
ConstructorsConstructorDescriptionDifference(ITable expectedTable, ITable actualTable, int rowIndex, String columnName, Object expectedValue, Object actualValue) Creates a difference with no fail message.Difference(ITable expectedTable, ITable actualTable, int rowIndex, String columnName, Object expectedValue, Object actualValue, String failMessage) Creates a difference with the given fail message. -
Method Summary
Modifier and TypeMethodDescriptionReturns the table containing the actual results.Returns the actual cell value.Returns the name of the differing column.Returns the table containing the expected results.Returns the expected cell value.Returns the comparison failure message.intReturns the row index of the differing cell.voidsetFailMessage(String failMessage) Sets the comparison failure message.toString()
-
Constructor Details
-
Difference
public Difference(ITable expectedTable, ITable actualTable, int rowIndex, String columnName, Object expectedValue, Object actualValue) Creates a difference with no fail message.- Parameters:
expectedTable- the table containing the expected results.actualTable- the table containing the actual results.rowIndex- the row index of the differing cell.columnName- the name of the differing column.expectedValue- the expected cell value.actualValue- the actual cell value.
-
Difference
public Difference(ITable expectedTable, ITable actualTable, int rowIndex, String columnName, Object expectedValue, Object actualValue, String failMessage) Creates a difference with the given fail message.- Parameters:
expectedTable- the table containing the expected results.actualTable- the table containing the actual results.rowIndex- the row index of the differing cell.columnName- the name of the differing column.expectedValue- the expected cell value.actualValue- the actual cell value.failMessage- the comparison failure message.
-
-
Method Details
-
toString
-
getExpectedTable
Returns the table containing the expected results.- Returns:
- the table containing the expected results.
-
getActualTable
Returns the table containing the actual results.- Returns:
- the table containing the actual results.
-
getRowIndex
public int getRowIndex()Returns the row index of the differing cell.- Returns:
- the row index of the differing cell.
-
getColumnName
Returns the name of the differing column.- Returns:
- the name of the differing column.
-
getExpectedValue
Returns the expected cell value.- Returns:
- the expected cell value.
-
getActualValue
Returns the actual cell value.- Returns:
- the actual cell value.
-
getFailMessage
Returns the comparison failure message.- Returns:
- the comparison failure message.
-
setFailMessage
Sets the comparison failure message.- Parameters:
failMessage- the comparison failure message.
-