public void Query_InTransaction_ShouldHaveTransaction()
        {
            var resource = new StorageResource(LifetimeScope);

            bool hasTransaction;

            using (var transaction = resource.Begin())
            {
                hasTransaction = resource.HasTransaction;
            }

            Assert.IsTrue(hasTransaction);
        }
        public void MultipleTransaction_EndTransaction_NoTransactionLevel()
        {
            var resource = new StorageResource(LifetimeScope);

            var first  = resource.Begin();
            var second = resource.Begin();
            var third  = resource.Begin();

            var threeLevels = resource.TransactionLevel;

            third.Dispose();
            var twoLevels = resource.TransactionLevel;

            second.Dispose();
            var oneLevel = resource.TransactionLevel;

            first.Dispose();
            var noLevels = resource.TransactionLevel;

            Assert.AreEqual(threeLevels, 3);
            Assert.AreEqual(twoLevels, 2);
            Assert.AreEqual(oneLevel, 1);
            Assert.AreEqual(noLevels, 0);
        }