public void Given() { eventSource = new ConfigurationChangeEventSourceImpl(); configurationSource = new DictionaryConfigurationSource(); configurationSource.Add(testsSectionName, new TestsConfigurationSection()); mockLocator = new Mock <IServiceLocator>().Object; eventSource.SourceChanged += (sender, e) => { sourceChangedEventArgs = e; }; eventSource.GetSection <TestsConfigurationSection>().SectionChanged += (sender, e) => { sectionChangedEventArgs = e; }; eventSource.GetSection <AppSettingsSection>().SectionChanged += (sender, e) => { appSettingsChangedEventArgs = e; }; eventSource.ConfigurationSourceChanged(configurationSource, mockLocator, testsSectionName); }
public void Given() { eventSource = new ConfigurationChangeEventSourceImpl(); configurationSource = new DictionaryConfigurationSource(); configurationSource.Add(testsSectionName, new TestsConfigurationSection()); mockLocator = new Mock<IServiceLocator>().Object; eventSource.SourceChanged += (sender, e) => { sourceChangedEventArgs = e; }; eventSource.GetSection<TestsConfigurationSection>().SectionChanged += (sender, e) => { sectionChangedEventArgs = e; }; eventSource.GetSection<AppSettingsSection>().SectionChanged += (sender, e) => { appSettingsChangedEventArgs = e; }; eventSource.ConfigurationSourceChanged(configurationSource, mockLocator, testsSectionName); }