public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();

            _filename = GetTempFilePath();
            _finalmergefile = GetTempFilePath();
            _finalmergefile2 = GetTempFilePath();

            _map = IndexMap.FromFile(_filename);
            var memtable = new HashListMemTable(maxSize: 10);
            memtable.Add(0, 1, 0);
            var guidFilename = new GuidFilenameProvider(PathName);
            _result = _map.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, _ => true, guidFilename);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 1, 2, _ => true, new FakeFilenameProvider(_finalmergefile, _finalmergefile2));
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
        }
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();

            _filename = GetTempFilePath();
            _finalmergefile = GetTempFilePath();
            _finalmergefile2 = GetTempFilePath();

            _map = IndexMap.FromFile(_filename, _ptableVersion);
            var memtable = new HashListMemTable(_ptableVersion, maxSize: 10);
            memtable.Add(0, 1, 0);
            var guidFilename = new GuidFilenameProvider(PathName);
            _result = _map.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 0, 0, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), guidFilename, _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
            _result = _result.MergedMap.AddPTable(PTable.FromMemtable(memtable, GetTempFilePath()), 1, 2, (streamId, hash) => hash, _ => true, _ => new System.Tuple<string, bool>("", true), new FakeFilenameProvider(_finalmergefile, _finalmergefile2), _ptableVersion);
            _result.ToDelete.ForEach(x => x.MarkForDestruction());
        }