unit test service layer - NUnit, NHibernate

Posted by csetzkorn on Stack Overflow See other posts from Stack Overflow or by csetzkorn
Published on 2010-03-17T09:42:59Z Indexed on 2010/03/17 10:31 UTC
Read the original article Hit count: 320

Filed under:
|
|

Hi,

I would like to unit test a DEPENDENT service layer which allows me to perform CRUD operation without mocking using NUnit. I know this is probably bad practice but I want to give it a try anyway - even if the tests have to run over night. My data is persisted using NHibernate and I have implemented a little library that 'bootstraps' the database which I could use in a [Setup] method. I am just wondering if someone has done something similar and what the fastest method for bootstrapping the database is. I am using something like this:

var cfg = new Configuration(); cfg.Configure(); cfg.AddAssembly("Bla"); new SchemaExport(cfg).Execute(false, true, false);

to establish the db schema. After that I populate some lookup tables from some Excel tables.

Any feedback would be very much appreciated. Thanks.

Christian

© Stack Overflow or respective owner

Related posts about nunit

Related posts about nhibernate