public void SetUp() { NHibernateInstaller = new TestConfigurationBuilder(); Configuration = NHibernateInstaller.BuildConfiguration("testdb"); SessionFactory = Configuration.BuildSessionFactory(); NHibernateInstaller.Contribute("testdb", SessionFactory, Configuration); Session = SessionFactory.OpenSession(); }
public void TearDown() { if (Session != null) { Session.Dispose(); Session = null; } if (SessionFactory != null) { SessionFactory.Dispose(); SessionFactory = null; } if (NHibernateInstaller != null) { NHibernateInstaller.Dispose(); NHibernateInstaller = null; } Configuration = null; }