The World’s Leading Microsoft .NET Magazine
   
 
timstall

Donate Today!

Search Box

 

Calendar

««May 2008»»
SMTWTFS
     123
45678910
11
12
13
14
15
1617
18192021222324
25262728293031

My Top Tags

                                       

Mailing List

My RSS Feeds








Unit Testing the Data Access Layer

posted Tuesday, 5 April 2005

I had the opportunity to write an article for 4guysfromrolla - "Unit Testing the Data Access Layer".

"Unit testing is becoming very popular among .NET projects, but unit testing the Data Access Layer (DAL) still remains a common obstacle. The problem stems from the very nature of databases: they are slow, common, persistent, external, and relational. This conflicts the nature of unit tests, which should be quick, independent, and repeatable..."

You can read the entire article on the 4GFR website at:

http://aspnet.4guysfromrolla.com/articles/040605-1.aspx

links: digg this    technorati    




1. a reader left...
Thursday, 7 April 2005 10:56 am

Great article; I'll find this very useful. I liked how you explained the two methods - RunScript and RecreateDBSchema, and then provided practical examples.

Mark


2. a reader left...
Friday, 20 May 2005 7:30 pm

I believe that any DataLayer must be a simple code block, that they allow operations against DB.

That code block would not have to know on the Business Entities. Single to specialize it is to execute the operations (Store Procedures and SQL Sentences) against the engine DB (SQL, Oracle, DB2, etc.), with which this setting.

Finally, I invite to you to download the DataLayer.Primitives Public Version.

This is very cool Data Layer :)

DataLayer.Primitives - Readme!
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=1389

Cheers,

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

Javier Luna


3. Mike Brockey left...
Friday, 13 October 2006 4:11 pm :: http://blogs.ent0.com/blogs/mikebrockey/

Hi Tim - Very good article! We have come up with a way to snapshot the database, track changes and then put the database back into a known state. dataFresh is an API that integrates directly into your test framework and will very quickly restore only those tables that were modified. Check out my blog for the details!

http://blogs.ent0.com/blogs/datafresh/default.aspx