BTDBTest.KeyValueDBTest.FindLastKeyWorks C# (CSharp) Method

FindLastKeyWorks() private method

private FindLastKeyWorks ( ) : void
return void
        public void FindLastKeyWorks()
        {
            using (var fileCollection = new InMemoryFileCollection())
            using (IKeyValueDB db = new KeyValueDB(fileCollection))
            {
                using (var tr = db.StartTransaction())
                {
                    Assert.False(tr.FindLastKey());
                    tr.CreateKey(_key1);
                    tr.CreateKey(Key2);
                    tr.CreateKey(_key3);
                    Assert.True(tr.FindLastKey());
                    Assert.Equal(Key2, tr.GetKeyAsByteArray());
                    tr.Commit();
                }
            }
        }