I use DbUnit for unit-testing of my DAO objects. It works great so far.
I have a problem, I have field ob type byte[]
which is stored as BLOB in the database. The column is not-null. How can I specify the value for this column in the XML dataset file, that DbUnit uses? The value can be nothing fancy, 5 bytes will be enough. I would like to avoid necessity to create extra binary files just for this.
Any suggestions?
After all I solved it like that:
XML dataset file:
DbUnit has built-in support for Base64 encoded data, it transformes correctly into byte array.
Test case code: