public void CommitWorks()
{
using (IKeyValueDB db = new InMemoryKeyValueDB())
{
using (var tr1 = db.StartTransaction())
{
tr1.CreateKey(_key1);
using (var tr2 = db.StartTransaction())
{
Assert.Equal(0, tr2.GetTransactionNumber());
Assert.False(tr2.FindExactKey(_key1));
}
tr1.Commit();
}
using (var tr3 = db.StartTransaction())
{
Assert.Equal(1, tr3.GetTransactionNumber());
Assert.True(tr3.FindExactKey(_key1));
}
}
}