views:

54

answers:

2

Hello there

How can I write a unit test for CRUD using in memory database with fluent nhibernate

+1  A: 

You wouldn't write a unit test (which by the standard definition does not involve external systems).

Instead you would write an integration test and I think this is what you're looking for..

http://wiki.fluentnhibernate.org/Persistence_specification_testing

ShaneC
Thanks that help, I did find a way of doing it but your link answered alot of questions also
Matthew
A: 

Check out this article by Ayende, it provides a nice base class for doing in-memory NHibernate unit tests: http://ayende.com/Blog/archive/2009/04/28/nhibernate-unit-testing.aspx

DanP