History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UNI-13
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Tim Ducheyne
Reporter: Tim Ducheyne
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Unitils

Expected dataset: give clearer error message

Created: 25/Sep/07 05:06 PM   Updated: 27/Apr/09 08:17 AM
Component/s: dbunit
Affects Version/s: 1.0-rc-4
Fix Version/s: 2.3


 Description  « Hide
Reported on sourceforge by Filip Neven (filip_neven): issue 1690522

When comparing the content of the database with dataset contents using
@ExpectedDataSet, a vague error message is given. More detail should be
added to make it clearer.

 All   Comments   Change History      Sort Order:
Denis Labaye - 27/Jan/09 07:07 AM
Any workaround to get a precise report of the difference between two dataset ?

Thanks,

Denis

Tim Ducheyne - 27/Apr/09 08:17 AM
I reworked the expected data set behavior. It now gives much clearer error messages.
Some other things were also solved: for more info see

http://jira.unitils.org/browse/UNI-123


Example output:

java.lang.AssertionError: Assertion failed. Differences found between the expected data set and actual database content.
Found differences for table PUBLIC.TEST:

  Different row:
  pk, column1, column2
  "1", "value1", "xxxx"

  Best matching differences:
  column2: "xxxx" <-> "value2"


Actual database content:

PUBLIC.TEST
  COLUMN1, COLUMN2
  "value1", "value2"
  "value2", "value3"


Other example output:

java.lang.AssertionError: Assertion failed. Differences found between the expected data set and actual database content.
Expected table to be empty but found rows for table PUBLIC.TEST


Actual database content:

PUBLIC.TEST
  COLUMN1, COLUMN2
  "value1", "value2"
  "value2", "value3"