Package org.dbunit.database.rowcount
Class RowCountDifference
java.lang.Object
org.dbunit.database.rowcount.RowCountDifference
Immutable record of one table's row count having changed between a
RowCountCheck baseline and a later comparison.- Since:
- 3.6.0
- Author:
- dbunit
-
Constructor Summary
ConstructorsConstructorDescriptionRowCountDifference(String tableName, int baselineCount, int currentCount) Creates a difference for the given table. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the row count captured before the test.intReturns the row count found at comparison time.intgetDelta()Returns how much the row count changed.Returns the name of the table whose count changed.inthashCode()toString()Returns a one-line, human-readable description of this difference, naming the table, both counts, the signed delta, and direction-specific advice; the table name prints in the formIDataSet.getTableNames()returned it, so it can be pasted straight into a dataset or an exclude list.
-
Constructor Details
-
RowCountDifference
Creates a difference for the given table.- Parameters:
tableName- The name of the table whose count changed, in the formIDataSet.getTableNames()returned it.baselineCount- The row count captured before the test.currentCount- The row count found at comparison time.
-
-
Method Details
-
getTableName
Returns the name of the table whose count changed.- Returns:
- The table name, in the form
IDataSet.getTableNames()returned it.
-
getBaselineCount
public int getBaselineCount()Returns the row count captured before the test.- Returns:
- The baseline row count.
-
getCurrentCount
public int getCurrentCount()Returns the row count found at comparison time.- Returns:
- The current row count.
-
getDelta
public int getDelta()Returns how much the row count changed.- Returns:
getCurrentCount()minusgetBaselineCount(); positive when rows were left behind, negative when rows that should remain were removed.
-
equals
-
hashCode
public int hashCode() -
toString
Returns a one-line, human-readable description of this difference, naming the table, both counts, the signed delta, and direction-specific advice; the table name prints in the formIDataSet.getTableNames()returned it, so it can be pasted straight into a dataset or an exclude list.
-