Example #1
0
        public void RecordDeleteCreatesJournalEntry()
        {
            var journal = new FileJournal("Wrote", null);

            journal.JournalIntervalSeconds = 10000;

            string dir = string.Format(@"{0}\Journal", journal.DirectoryPath);

            try
            {
                Assert.AreEqual(0, Directory.GetFiles(dir).Length);
                journal.RecordDelete(1);
                Assert.AreEqual(1, Directory.GetFiles(dir).Length);
            }
            finally
            {
                journal.DeleteDatabase();
                Directory.Delete("Wrote");
            }
        }
Example #2
0
 public void Delete(int id)
 {
     memoryStore.Delete(id);
     indexStore.RemoveObject(id);
     journal.RecordDelete(id);
 }