Can any body tell me how to use Microsoft built in Tests with NHibernate For Repository Layer(DAL)?
views:
34answers:
1
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...
Dani
2009-11-18 10:58:05