tags:

views:

34

answers:

1

Can any body tell me how to use Microsoft built in Tests with NHibernate For Repository Layer(DAL)?

A: 

I'm using NUNIT tests to test NH mappings. you create test (regular) that create objects, updates them and delete them. Just like any other test - you assert for the results by checking the DB after the operation. (if you delete an object, you should be able to "get" it... ect...)

I create a session in the beginning of each test, and close it at the end.

same goes to any other function the dal has...

NUnit website

Dani