Exemplo n.º 1
0
            public void Save_Session_For_Reuse()
            {
                var uow = new NHibernateUnitOfWork(_mockSession.Object);

                Assert.AreSame(uow.Session, _mockSession.Object);
                uow.Dispose();
            }
Exemplo n.º 2
0
            public void Open_A_New_Transaction()
            {
                var uow = new NHibernateUnitOfWork(_mockSession.Object, IsolationLevel.ReadUncommitted);

                _mockSession.Verify(ms => ms.BeginTransaction(It.IsAny<IsolationLevel>()));
                uow.Dispose();
            }
Exemplo n.º 3
0
            public void Use_IsolationLevel_Of_ReadCommitted_By_Default()
            {
                var uow = new NHibernateUnitOfWork(_mockSession.Object);

                _mockSession.Verify(ms => ms.BeginTransaction(IsolationLevel.ReadCommitted));
                uow.Dispose();
            }