Пример #1
0
		public void SaveWatchedFileToSettingsOnDispose()
		{
			var settings = new MockSettings();
			var fileWatcher = new MockFileWatcher();
			fileWatcher.SetFile(FilePath);
			fileWatcher.Dispose();
			Assert.AreEqual(FilePath, settings.GetValue(FileWatcher.SettingsKey, ""));
		}
Пример #2
0
        public void SaveWatchedFileToSettingsOnDispose()
        {
            var settings    = new MockSettings();
            var fileWatcher = new MockFileWatcher();

            fileWatcher.SetFile(FilePath);
            fileWatcher.Dispose();
            Assert.AreEqual(FilePath, settings.GetValue(FileWatcher.SettingsKey, ""));
        }
Пример #3
0
		public void GetNotifiedIfFileChanges()
		{
			var fileWatcher = new MockFileWatcher();
			bool isUpdated = false;
			fileWatcher.Updated += () => isUpdated = true;
			fileWatcher.SetFile(FilePath);
			fileWatcher.UpdateFile();
			Assert.IsTrue(isUpdated);
		}
Пример #4
0
        public void GetNotifiedIfFileChanges()
        {
            var  fileWatcher = new MockFileWatcher();
            bool isUpdated   = false;

            fileWatcher.Updated += () => isUpdated = true;
            fileWatcher.SetFile(FilePath);
            fileWatcher.UpdateFile();
            Assert.IsTrue(isUpdated);
        }