public void IsTransactionValid()
        {
            TransactionManager tm = new Hyperstore.Tests.MemoryStore.MockTransactionManager();

            using (var tx1 = tm.BeginTransaction(SessionIsolationLevel.ReadCommitted))
            {
                var c = new CommandContext(tm);
                Assert.True(c.IsTransactionValid(tx1.Id));
                using (var tx2 = tm.BeginTransaction(SessionIsolationLevel.ReadCommitted))
                {
                    Assert.True(c.IsTransactionValid(tx2.Id));
                    tx2.Commit();
                    tx1.Commit();
                    Assert.True(c.IsTransactionValid(tx1.Id));
                    using (var tx3 = tm.BeginTransaction(SessionIsolationLevel.ReadCommitted))
                    {
                        Assert.True(c.IsTransactionValid(tx1.Id));
                        Assert.True(c.IsTransactionValid(tx3.Id));
                    }
                }
            }
        }
        public async Task Create_CommandContext_inside_a_current_transaction()
        {
            var store = await StoreBuilder.New().CreateAsync();

            using (var session = store.BeginSession())
            {
                TransactionManager tm = new Hyperstore.Tests.MemoryStore.MockTransactionManager();
                using (var tx = tm.BeginTransaction(SessionIsolationLevel.ReadCommitted))
                {
                    var c = new CommandContext(tm);
                    Assert.Equal(c.CommandId, 0);
                    Assert.Equal(c.Transaction, tx);
                    c.Dispose();
                }
            }
        }