Developer guidelines: assertions

Today we found out that a number of our unit tests were failing on the build server (and rightly so), but not on the developer’s PC.
This was caused by the fact that assertions were not enabled in Eclipse.
To avoid these problems in the future, we now ask everybody to adhere to the following guidelines:

You should [...]

Unitils xml dtd files

We use unitls to fill up our database with test data for junit tests.
To write these xml files is sometimes easy to have a dtd file so don’t need to know complete database scheme out of your head.
You can generate this file quit easy:

//get the database connection.
Connection connection = dataSource.getConnection();
//create dataset from db
IDataSet dataSet = [...]

Data storm

In our product team, we have a whole bunch of unit tests that load data from an XML dataset into an in-memory (HSQLDB) database.
We’re using the Unitils framework to load this data into the db, without constraints enabled.  This allows us to load only the data that concerns the test (another approach would be to [...]