public static ChangeTrackerSupport Initialize(FileContentTableWithTrackerTests test) { var loggingContext = new LoggingContext("Dummy", "Dummy"); var fileContentTable = FileContentTable.CreateNew(); VolumeMap volumeMap = JournalUtils.TryCreateMapOfAllLocalVolumes(loggingContext); XAssert.IsNotNull(volumeMap); var maybeJournal = JournalUtils.TryGetJournalAccessorForTest(volumeMap); XAssert.IsTrue(maybeJournal.Succeeded, "Could not connect to journal"); var fileChangeTracker = FileChangeTracker.StartTrackingChanges(loggingContext, volumeMap, maybeJournal.Result, null); return(new ChangeTrackerSupport( loggingContext, test.m_pathTable, fileChangeTracker, fileContentTable, volumeMap, maybeJournal.Result, AbsolutePath.Create(test.m_pathTable, test.TemporaryDirectory), null)); }
public void StartTracking() { var loggingContext = new LoggingContext("JournalTesting", "Dummy"); VolumeMap volumeMap = JournalUtils.TryCreateMapOfAllLocalVolumes(loggingContext); XAssert.IsNotNull(volumeMap); var maybeJournal = JournalUtils.TryGetJournalAccessorForTest(volumeMap); XAssert.IsTrue(maybeJournal.Succeeded); m_journal = maybeJournal.Result; m_changeTracker = FileChangeTrackingSet.CreateForAllCapableVolumes( loggingContext, volumeMap, m_journal); }