.net - Unit Testing the Data Access Layer -


I want to test the data layer, how do I go about it? I'm using NUnit for my business object testing. Should I use fake items (which I have never done before)?

If someone can guide me in the right direction, then I appreciate any input.

Using the mock object depends on your unit test. If you do not want to initialize several objects to test an object, you can use fake to simulate the behavior of other objects.

To test DAL objects, you must reset the DB state every time. As the test running on your database will create several records that can change the status of the DB.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -