/* * Move the cursor according to recno. The recno * starts from 1 and is increased by 1. */ public void MoveCursorToRecno(BTreeCursor cursor, LockingInfo lck) { for (uint i = 1; i <= 5; i++) if (lck == null) Assert.IsTrue(cursor.Move(i)); else Assert.IsTrue(cursor.Move(i, lck)); }
/*l * Move the cursor according to a given recno and * return the current record's recno. The given recno * and the one got from the cursor should be the same. */ public void ReturnRecno(BTreeCursor cursor, LockingInfo lck) { for (uint i = 1; i <= 5; i++) if (lck == null) { if (cursor.Move(i) == true) Assert.AreEqual(i, cursor.Recno()); } else { if (cursor.Move(i, lck) == true) Assert.AreEqual(i, cursor.Recno(lck)); } }