R – Delete all db schema in test teardown using nhibernate

fluent-nhibernatenhibernatenunitschema

I am looking for the best way to delete all schema changes(all tables really) made when unit testing.

I am using fluent to map my entities and create the schema in the Setup of my tests. I want to be able to delete the schema changes at the end of the tests in the Teardown.

I am using nhibernates SchemaExport to generate the schema.

Sure this is being done at the moment and would appreciate some pointers.

Cheers,

Best Answer

The SchemaExport.Execute has parameter to justDrop.

Related Topic