public class DataSetAssert extends Object
| Constructor and Description |
|---|
DataSetAssert() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendBestRowDifferences(TableDifference tableDifference,
StringBuilder result)
Appends the best matching row differences of the given table difference to the result
|
protected void |
appendColumnNames(Row row,
StringBuilder result)
Appends the column names of the given row to the result
|
protected void |
appendMissingRowDifferences(TableDifference tableDifference,
StringBuilder result)
Appends the missing rows of the given table difference to the result
|
protected void |
appendMissingTableDifferences(SchemaDifference schemaDifference,
StringBuilder result)
Appends the missing tables of the given schema difference to the result
|
protected void |
appendRow(Row row,
StringBuilder result)
Appends the values of the given row to the result
|
protected void |
appendSchemaContent(Schema schema,
Schema actualSchema,
StringBuilder result)
Appends all rows and tables of the actual schema to the result.
|
protected void |
appendTableDifferences(SchemaDifference schemaDifference,
StringBuilder result)
Appends the table differences of the given schema difference to the result
|
protected void |
appendTableName(Schema schema,
Table table,
StringBuilder result)
Appends the schema and table name to the result
|
void |
assertEqualDbUnitDataSets(String schemaName,
org.dbunit.dataset.IDataSet expectedDataSet,
org.dbunit.dataset.IDataSet actualDataSet)
Asserts that the given expected DbUnit data set is equal to the actual DbUnit data set.
|
void |
assertEqualSchemas(Schema expectedSchema,
Schema actualSchema)
Asserts that the given expected schema is equal to the actual schema.
|
protected String |
generateErrorMessage(SchemaDifference schemaDifference)
Formats the assertion failed message for the given difference.
|
public void assertEqualSchemas(Schema expectedSchema, Schema actualSchema) throws AssertionError
expectedSchema - The expected schema, not nullactualSchema - The actual schema, not nullAssertionError - When the assertion fails.public void assertEqualDbUnitDataSets(String schemaName, org.dbunit.dataset.IDataSet expectedDataSet, org.dbunit.dataset.IDataSet actualDataSet)
schemaName - The name of the schema that these data sets belong to, not nullexpectedDataSet - The expected data set, not nullactualDataSet - The actual data set, not nullAssertionError - When the assertion fails.protected String generateErrorMessage(SchemaDifference schemaDifference)
schemaDifference - The difference, not nullprotected void appendMissingTableDifferences(SchemaDifference schemaDifference, StringBuilder result)
schemaDifference - The difference, not nullresult - The result to append to, not nullprotected void appendTableDifferences(SchemaDifference schemaDifference, StringBuilder result)
schemaDifference - The difference, not nullresult - The result to append to, not nullprotected void appendMissingRowDifferences(TableDifference tableDifference, StringBuilder result)
tableDifference - The difference, not nullresult - The result to append to, not nullprotected void appendBestRowDifferences(TableDifference tableDifference, StringBuilder result)
tableDifference - The difference, not nullresult - The result to append to, not nullprotected void appendColumnNames(Row row, StringBuilder result)
row - The row, not nullresult - The result to append to, not nullprotected void appendRow(Row row, StringBuilder result)
row - The row, not nullresult - The result to append to, not nullprotected void appendSchemaContent(Schema schema, Schema actualSchema, StringBuilder result)
schema - The expected schema, not nullactualSchema - The actual schema, not nullresult - The result to append to, not nullprotected void appendTableName(Schema schema, Table table, StringBuilder result)
schema - The schema name, not nulltable - The table name, not nullresult - The result to append to, not nullCopyright © 2016. All Rights Reserved.