Esempio n. 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, ""));
		}
Esempio n. 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, ""));
        }
Esempio n. 3
0
		public void GetNotifiedIfFileChanges()
		{
			var fileWatcher = new MockFileWatcher();
			bool isUpdated = false;
			fileWatcher.Updated += () => isUpdated = true;
			fileWatcher.SetFile(FilePath);
			fileWatcher.UpdateFile();
			Assert.IsTrue(isUpdated);
		}
Esempio n. 4
0
        public void GetNotifiedIfFileChanges()
        {
            var  fileWatcher = new MockFileWatcher();
            bool isUpdated   = false;

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