public void RegisterInterceptors_RegisterInterceptors_AddedToInterceptorsCollection() { var interceptor = new TestInterceptor(); ConfigurationManager.RegisterInterceptors(interceptor); Assert.That(ConfigurationManager.Interceptors[0], Is.EqualTo(interceptor)); }
public void AppSetting_WithInterceptor_CallsInterceptor() { var interceptor = new TestInterceptor(); ConfigurationManager.RegisterInterceptors(interceptor); var appSettings = new NameValueCollection {{"key", "value"}}; var cfgMgr = new ConfigurationManager(appSettings); cfgMgr.AppSettings.AppSetting("key"); Assert.That(interceptor.Called, Is.True); }
public void AppSetting_WithInterceptor_CallsInterceptor() { var interceptor = new TestInterceptor(); ConfigurationManager.RegisterInterceptors(interceptor); var appSettings = new NameValueCollection { { "key", "value" } }; var cfgMgr = new ConfigurationManager(appSettings); cfgMgr.AppSettings.AppSetting("key"); Assert.That(interceptor.Called, Is.True); }