How to correctly unit test my DAL?

I'm new to unit testing. But how do I unit test my DAL which is written with Entity Framework, so I can make sure my DAL code is working correctly but no database is actually touched? Could someone give as much detail as possible please.


If you want to test that your data access layer works correct you really need to test it against a database at some point as otherwise you aren't actually testing it works.

Need Your Help

App data loss from NSDocumentDirectory in iOS 5

iphone ios xcode

When I update from iOS 4+ to iOS 5, I lose all data in my own app. I also upgraded to OSX Lion and Xcode 4. I back up my iPhone in iTunes and was able to get the data using iPhone Backup Extractor....

datePicker with maximum year current year

ios objective-c datepicker uidatepicker

I am developing an iPhone app where user can save Birthdays along with other data.