Should I Unit Test Data Access Layer? Is this a good practice and how to do it?

There's no right answer to this, it really depends. Some people (e. G Roy Osherove ) say you should only test code which has conditional logic (IF statements etc), which may or may not include your DAL.

Some people (often those doing TDD) will say you should test everything, including the DAL, and aim for 100% code coverage.

It is a good practice to write unit test for every layer, even the DAL.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions