Ejemplo n.º 1
0
        /// <exception cref="System.Exception"></exception>
        private BTree CycleIntKeys(BTree btree, int[] values)
        {
            for (int i = 0; i < values.Length; i++)
            {
                btree.Add(Trans(), values[i]);
            }
            ExpectKeysSearch(Trans(), btree, values);
            btree.Commit(Trans());
            int id = btree.GetID();

            Container().Commit(Trans());
            Reopen();
            btree = BTreeAssert.CreateIntKeyBTree(Container(), id, BtreeNodeSize);
            ExpectKeysSearch(Trans(), btree, values);
            for (int i = 0; i < values.Length; i++)
            {
                btree.Remove(Trans(), values[i]);
            }
            BTreeAssert.AssertEmpty(Trans(), btree);
            btree.Commit(Trans());
            BTreeAssert.AssertEmpty(Trans(), btree);
            return(btree);
        }
Ejemplo n.º 2
0
 protected virtual void AssertEmpty(Transaction transaction)
 {
     BTreeAssert.AssertEmpty(transaction, _btree);
 }