public void Commit_Method()
 {
   using (var connection = this.sessionFactory.OpenSession())
   {
     var transaction = new NHibernateTransaction(connection);
     Assert.True(ReferenceEquals(transaction.Commit(), transaction));
     Assert.False(transaction.Field("disposed").To<bool>());
     Assert.True(transaction.Field("wasCommitted").To<bool>());
     Assert.False(transaction.Field("wasRolledBack").To<bool>());
   }
 }
Esempio n. 2
0
 public void Commit_Method()
 {
     using (var connection = this.sessionFactory.OpenSession())
     {
         var transaction = new NHibernateTransaction(connection);
         Assert.True(ReferenceEquals(transaction.Commit(), transaction));
         Assert.False(transaction.Field("disposed").To <bool>());
         Assert.True(transaction.Field("wasCommitted").To <bool>());
         Assert.False(transaction.Field("wasRolledBack").To <bool>());
     }
 }