Published at: 08:03 pm - Sunday March 27 2011
This is the last part in this little series about testing of database code. In the first part I extracted the session handling for the tests into a JUnit Rule. In the second part I introduced ObjectMothers for easy creation of instances in the database. In this part I’ll simplify the implementation of new ObjectMothers [...]
Published at: 11:03 am - Sunday March 20 2011
In the first part of this little series I showed a simple test based on a simple data model. As we saw the code for the test wasn’t simple at all, but quite ugly. We started to fix that by moving out all the SessionFactory and Session handling stuff out into a Rule. Leaving us [...]
Published at: 11:03 pm - Sunday March 13 2011
Databases are an extremely important part of almost every enterprise application. Yet there is very little support for testing your database, which results in very little tests coverage of database related code out in the wild. In a desperate attempt to change that at least a little the article series starting with this article will [...]