Unit Testing and Databases
I know this is a perenial question but I figured it was about time to ask it again. How do you do Unit Tests with Database functionality effectively?
I created an in-house system where the data representing different scenarios is represented in XML files (of course...) and a process runs through them to create a load script for an in-memory database. (HSQLDB in my case.) The in-memory database can be loaded very quickly -- DDL for a few hundred tables and thousands of records in a few seconds -- which makes it very useful for unit testing. Representing the data for the different scenarios externally makes it easier for domain knowledge people to do what they need to do.
Fog Creek Home