public void WhenDisposed_ThenSessionIsReleasedForCurrentThread()
        {
            var sessionFactoryMock = new Mock<ISessionFactory>();
            var session = new Mock<ISession>().Object;

            var testee = new ActiveMqTransaction(sessionFactoryMock.Object, session);
            testee.Dispose();

            sessionFactoryMock.Verify(sf => sf.RemoveSessionForCurrentThread());
        }
        public void WhenDisposed_ThenSessionIsRollbacked()
        {
            var sessionFactoryMock = new Mock<ISessionFactory>();
            var sessionMock = new Mock<ISession>();

            var testee = new ActiveMqTransaction(sessionFactoryMock.Object, sessionMock.Object);
            testee.Dispose();

            sessionMock.Verify(s => s.Rollback());
            sessionMock.Verify(s => s.Commit(), Times.Never());
        }