BTDBTest.ObjectDbTableFreeContentTest.FreeIIndirect C# (CSharp) Method

FreeIIndirect() private method

private FreeIIndirect ( ) : void
return void
        public void FreeIIndirect()
        {
            Func<IObjectDBTransaction, IHddRelation> creator;
            using (var tr = _db.StartTransaction())
            {
                creator = tr.InitRelation<IHddRelation>("HddRelation");
                var files = creator(tr);
                var file = new File
                {
                    Id = 1,
                    Data = new DBIndirect<RawData>(new RawData
                    {
                        Data = new byte[] { 1, 2, 3 },
                        Edges = new Dictionary<ulong, ulong> { [10] = 20 }
                    })
                };
                files.Insert(file);
                tr.Commit();
            }
            AssertNoLeaksInDb();
            using (var tr = _db.StartTransaction())
            {
                var files = creator(tr);
                var file = files.FindById(1);
                Assert.Equal(file.Data.Value.Data, new byte[] { 1, 2, 3 });
                files.RemoveById(1);
                tr.Commit();
            }
            AssertNoLeaksInDb();
        }