Can any body开发者_如何转开发 tell me how to use Microsoft built in Tests with NHibernate For Repository Layer(DAL)?
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
精彩评论