BTDBTest.KeyValueDBTest.AddingContinueToSameFileAfterReopen C# (CSharp) Method

AddingContinueToSameFileAfterReopen() private method

private AddingContinueToSameFileAfterReopen ( ) : void
return void
        public void AddingContinueToSameFileAfterReopen()
        {
            using (var fileCollection = new InMemoryFileCollection())
            {
                using (IKeyValueDB db = new KeyValueDB(fileCollection))
                {
                    using (var tr = db.StartTransaction())
                    {
                        tr.CreateOrUpdateKeyValue(_key1, _key1);
                        tr.Commit();
                    }
                }
                using (IKeyValueDB db = new KeyValueDB(fileCollection))
                {
                    using (var tr = db.StartTransaction())
                    {
                        tr.CreateOrUpdateKeyValue(Key2, Key2);
                        tr.Commit();
                    }
                    Console.WriteLine(db.CalcStats());
                }
                Assert.Equal(2u, fileCollection.GetCount()); // Log + Index
            }
        }