Differences between revisions 2 and 3
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 * Some columns not populating? You probably didn't specify a DTD and those columns weren't mentioned in the data for the first row. See the [http://dbunit.sourceforge.net/components.html#flatxmldataset warning] and [http://dbunit.sourceforge.net/faq.html#generatedtd instructions] for generating a DTD. I temporarily added a test as a quick-and-dirty way of executing this:
{{{
    public void nontestExportDtd() throws Exception {
        IDatabaseConnection connection = getConnection();
        FlatDtdDataSet.write(connection.createDataSet(),
                new FileOutputStream(XML_DATASET_ROOT+"test.dtd"));
    }
}}}

[http://www.dbunit.org/ DbUnit] is a very handy tool for inserting test data into your database or confirming data after your tests. Sometimes, however, you run into gotchas.

    public void nontestExportDtd() throws Exception {
        IDatabaseConnection connection = getConnection();
        FlatDtdDataSet.write(connection.createDataSet(),
                new FileOutputStream(XML_DATASET_ROOT+"test.dtd"));
    }

iDIAcomputing: DbUnit (last edited 2009-07-27 18:25:53 by localhost)