I’ve implemented the manual unit testing solution that Roy Osherove describes in his latest article: Simplified Database Unit testing using Enterprise Services. For some of my tests, I would execute a SQL script to drop and recreate the database each time. In others, I would remove the records that I created in the TearDown method of my TestFixture.
I really like the idea that Roy proposes to leverage automatic transactions in Enterprise Services to avoid manually removing the changes made to the DB after each test. Andres Aguiar correctly points out some dangers posed by side-effects caused triggers and identity columns in Roy’s comments.