public void TestCurrentRecord() { testName = "TestCurrentRecord"; SetUpTest(true); DatabaseEnvironment env; RecnoDatabase db; Logging(testHome, testName, out env, out db); // Get log cursor to read/write log. LogCursor logCursor = env.GetLogCursor(); /* * Move the cursor to the beginning of the #1 log file. * Get the current LSN and confirm that is the position * the cursor is moved to. */ LSN lsn = new LSN(1, 0); logCursor.Move(lsn); Assert.IsNotNull(logCursor.CurrentRecord.Data); // Close all. logCursor.Close(); db.Close(); env.Close(); }
public void TesCurrentLSN() { testName = "TesCurrentLSN"; SetUpTest(true); RecnoDatabase db; Logging(testHome, testName, out env, out db); // Get log cursor to read/write log. LogCursor logCursor = env.GetLogCursor(); /* * Move the cursor to the beginning of the #1 log file. * Get the current LSN and confirm that is the position * the cursor is moved to. */ LSN lsn = new LSN(1, 0); logCursor.Move(lsn); Assert.AreEqual(lsn.LogFileNumber, logCursor.CurrentLSN.LogFileNumber); Assert.AreEqual(lsn.Offset, logCursor.CurrentLSN.Offset); // Close all. logCursor.Close(); db.Close(); env.Close(); }
public void TestLsn() { testName = "TestLsn"; SetUpTest(true); LSN lsn = new LSN(12, 411); Assert.AreEqual(12, lsn.LogFileNumber); Assert.AreEqual(411, lsn.Offset); LSN newLsn = new LSN(15, 410); Assert.AreEqual(0, LSN.Compare(lsn, lsn)); Assert.Greater(0, LSN.Compare(lsn, newLsn)); }
public void TestLsn() { testName = "TestLsn"; testHome = testFixtureHome + "/" + testName; Configuration.ClearDir(testHome); LSN lsn = new LSN(12, 411); Assert.AreEqual(12, lsn.LogFileNumber); Assert.AreEqual(411, lsn.Offset); LSN newLsn = new LSN(15, 410); Assert.AreEqual(0, LSN.Compare(lsn, lsn)); Assert.Greater(0, LSN.Compare(lsn, newLsn)); }
public override string ToString() { string result = ""; result += "Сигнатура:" + Signature + "\n"; result += "Смещение массива данных:" + UsaOffset.ToString() + "\n"; result += "Размер в словах номера последовательности обновления:" + UsaCount.ToString() + "\n"; result += "Номер последовательности файла транзакций:" + LSN.ToString() + "\n"; result += "Номер последовательности:" + SequenceNumber.ToString() + "\n"; result += "Счетчик жестких ссылок:" + LinkCount.ToString() + "\n"; result += "Смещение первого атрибута:" + AttrsOffset.ToString() + "\n"; result += "Флаги записи:" + Flags.ToString() + "\n"; result += "Реальный размер файловой записи в байтах :" + BytesInUse.ToString() + "\n"; result += "Выделенный размер файловой записи:" + BytesAllocated.ToString() + "\n"; result += "Ссылка на базовую файловую запись:" + BaseMFTRecord.ToString() + "\n"; result += "Идентификатор следующего атрибута:" + NextAttrInstance.ToString() + "\n"; result += "Индекс данной файловой записи:" + MFTRecordNumber.ToString() + "\n"; return(result); }
public void TestMove() { testName = "TestMove"; SetUpTest(true); DatabaseEnvironment env; RecnoDatabase db; Logging(testHome, testName, out env, out db); // Get log cursor to read/write log. LogCursor logCursor = env.GetLogCursor(); // Move the cursor to specified location in log files. LSN lsn = new LSN(1, 0); Assert.IsTrue(logCursor.Move(lsn)); // Close all. logCursor.Close(); db.Close(); env.Close(); }