public void OpenTransactionMustThrowObjectDisposedExceptionWhenSessionIsClose() { //arrange InitialiseNHibernate(); var uow = UnitOfWorkFactory.CreateWithoutRoot(); UnitOfWorkBase uowBaseClass = (UnitOfWorkBase)uow; uowBaseClass.OpenTransaction(); uow.Session.Close(); //act, assert Assert.Throws(typeof(ObjectDisposedException), uowBaseClass.OpenTransaction, "Session is closed!"); }