This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes DBUnit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "DBUnit" Watch "DBUnit" New topic


Deyna Cegielski
Ranch Hand

Joined: Nov 24, 2004
Posts: 60
Hi, im having trouble performing assertions of datasets and tables due to null values in some of the columns.

Consider the table TBL with columns COL1, COL2, COL3, COL4 COL5 and COL3 is optional.

My initial dataset would look like this (as this would be the norm for a row in this table):

<TBL COL1="val" COL2="val" COL4="val" COL5="val"/>

Now, i want to DELETE this row, so my expected dataset would be:


So when create the actual dataset and compare that against the expected dataset they are exactly the same (if i output them to xml) but the assertion fails with a column count error (expected 0, found 5).

I dont understand why because i am comparing datasets and not tables (and columns).

Any help would be appreciated.
subject: DBUnit
Similar Threads
Question of using SqlResultSetMapping
createNativeQuery Question
Making the text field width match.
getParameterValues []
Returning just a STRING from.......