public void ChangeInMainFileFiresTheAppropriateEvent() { ConfigurationSection section1 = configuration.GetSection("local.section.1"); coordinator.SetWatcherForConfigSource(section1.SectionInformation.ConfigSource); coordinator.ConfigurationChanged += OnConfigurationChanged; coordinator.OnConfigurationChanged(null, new ConfigurationChangedEventArgs(section1.SectionInformation.ConfigSource)); Assert.AreEqual(1, notifiedEvents.Count); Assert.AreEqual(ConfigurationChangeWatcherCoordinator.MainConfigurationFileSource, notifiedEvents[0].SectionName); }
public void ChangeInConfigurationFileFiresManageabilityUpdate() { MockManageabilityHelper manageabilityHelper = new MockManageabilityHelper(localSection1, externalSection1); instance = new ManageableConfigurationSourceImplementation(testConfigurationFile, manageabilityHelper, groupPolicyWatcher, watcherCoordinator, notificationCoordinator); manageabilityHelper.updateCalled = false; watcherCoordinator.OnConfigurationChanged(null, new ConfigurationChangedEventArgs(ConfigurationChangeWatcherCoordinator.MainConfigurationFileSource)); Assert.IsTrue(manageabilityHelper.updateCalled); }