Paul, We use NMock2 at work. I fully test the data layer against the database. Then I mock the calls against the data layer. If I am using something I am not sure about in communicating with the data layer, I will write unit tests against the data layer interface also. When using a web service to go against the database, I write full tests against the data layer.
Bobby -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Paul Cowan Sent: Friday, August 10, 2007 6:35 AM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: [ADVANCED-DOTNET] Unit tests and Mocking Hi, I have just discovered the excellent Rhino Mocks framework and am now wondering if it really is worth while actually maintaining unit tests that interact with the back-end database. I use NHibernate and there can be some pain associated with mapping file bugs but I do trust the frame work to do my basic crud operations. We use CI and one of the pains with the present project and the number of unit tests is of course how long the ever growing number of tests takes to run. Not to mention making sure the db is in an expected state both before and after the unit tests. Do other people make sure their tests include integration tests on the database? Cheers [EMAIL PROTECTED] _________________________________________________________________ =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com