I am writing some unit tests for a database component. To do this, I use a special test database (Postgresql, the same as the production database) and dbUnit.
Now I would like to dump the XML of the entire test database. I am currently using the code on the dbUnit FAQ page
IDatabaseConnection connection = new DatabaseConnection(conn);
connection.getConfig().setProperty("http://www.dbunit.org/properties/datatypeFactory", new PostgresqlDataTypeFactory());
IDataSet fullDataSet = connection.createDataSet();
FlatXmlDataSet.write(fullDataSet, new FileOutputStream("full.xml"));
All this works fine except for Array columns . dbUnit just leaves them. I was hoping this would be fixed by adding PostgresqlDataTypeFactory , but that does not change anything.
Does anyone know how I can add support for postgresql arrays in dbUnit?
source
share