public void AddQueryTest()
        {
            var context = new DatabaseContext(_provider.Object, _settings.Object);

            var query = new Mock<IQueryCommand>();

            // Act
            context.AddQuery(query.Object);

            Assert.IsTrue(context.QueryStore.Any());
            Assert.IsTrue(context.QueryStore.First() == query.Object);
        }
        public void CommitTest()
        {
            var context = new DatabaseContext(_provider.Object, _settings.Object);

            var query = new Mock<IQueryCommand>();

            context.AddQuery(query.Object);

            Assert.IsTrue(context.QueryStore.Any());

            // Act
            context.Commit();

            Assert.IsFalse(context.QueryStore.Any());
            query.Verify(q => q.Execute(It.Is<IDatabaseContext>(c => c == context)), Times.Once);
        }