public void CanRetrieveSectionFromSource()
        {
            DictionaryConfigurationSource source = LocalConfigurationSource.Create();

            Assert.IsTrue(source.Contains("test"));
            Assert.AreEqual(source.GetSection("test").GetType(), typeof(LocalConfigurationSection));
            Assert.IsTrue(source.Remove("test"));
            Assert.IsNull(source.GetSection("random"));
        }
        protected T GetSettings <T>() where T : ConfigurationSection
        {
            builder.UpdateConfigurationWithReplace(configSource);

            FieldInfo field = typeof(T).GetField("SectionName", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);

            var sectionName = (string)field.GetValue(null);

            return((T)configSource.GetSection(sectionName));
        }
        protected override void Arrange()
        {
            base.Arrange();

            var builder = new ConfigurationSourceBuilder();

            builder.ConfigureLogging()
            .LogToCategoryNamed("category")
            .SendTo
            .EventLog("listener")
            .SpecialSources
            .AllEventsCategory
            .SendTo
            .EventLog("listener")
            .SpecialSources
            .LoggingErrorsAndWarningsCategory
            .SendTo
            .EventLog("listener")
            .SpecialSources
            .UnprocessedCategory
            .SendTo
            .EventLog("listener");


            var source = new DictionaryConfigurationSource();

            builder.UpdateConfigurationWithReplace(source);

            ElementLookup  = Container.Resolve <ElementLookup>();
            LoggingSection = (LoggingSettings)source.GetSection(LoggingSettings.SectionName);
        }
        protected override void Arrange()
        {
            base.Arrange();

            validator = new LogFormatterValidator();

            errors = new List <ValidationResult>();

            IConfigurationSource       source       = new DictionaryConfigurationSource();
            ConfigurationSourceBuilder sourceBuiler = new ConfigurationSourceBuilder();

            sourceBuiler.ConfigureExceptionHandling()
            .GivenPolicyWithName("policy")
            .ForExceptionType <Exception>()
            .LogToCategory("category")
            .UsingExceptionFormatter <BadImageFormatException>();

            sourceBuiler.UpdateConfigurationWithReplace(source);

            ExceptionHandlingSettings EhabSettings = (ExceptionHandlingSettings)source.GetSection(ExceptionHandlingSettings.SectionName);

            var sectionModel = SectionViewModel.CreateSection(Container, "Ehab Section", EhabSettings);

            properties = sectionModel.GetDescendentsOfType <LoggingExceptionHandlerData>().First().Properties;
        }
示例#5
0
        protected override void Arrange()
        {
            base.Arrange();

            IConfigurationSource       source       = new DictionaryConfigurationSource();
            ConfigurationSourceBuilder sourceBuiler = new ConfigurationSourceBuilder();

            sourceBuiler.ConfigureLogging()
            .WithOptions.DisableTracing()
            .DoNotRevertImpersonation()
            .FilterOnPriority("prio filter").StartingWithPriority(10)
            .FilterOnCategory("categoryFiler").AllowAllCategoriesExcept("cat1")
            .LogToCategoryNamed("General")
            .SendTo.EventLog("Event Log Listener")
            .FormatWith(new FormatterBuilder().TextFormatterNamed("Default"))
            .LogToCategoryNamed("Critical")
            .SendTo.SharedListenerNamed("Event Log Listener")
            .SendTo.Custom <MyCustomListener>("Custom Listener")
            .SendTo.Email("Email Listener")
            .SendTo.SystemDiagnosticsListener("system diagnostics")
            .LogToCategoryNamed("msmq")
            .SendTo.Msmq("msmq");

            sourceBuiler.UpdateConfigurationWithReplace(source);
            LoggingSection = (LoggingSettings)source.GetSection(LoggingSettings.SectionName);
        }
示例#6
0
        public void BuildsWcfExceptionShildingWithFluentConfiguration()
        {
            DictionaryConfigurationSource emptyConfigSource = new DictionaryConfigurationSource();

            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureExceptionHandling()
            .GivenPolicyWithName("policy")
            .ForExceptionType(typeof(NotFiniteNumberException))
            .ShieldExceptionForWcf(typeof(MockFaultContract), "fault message")
            .MapProperty("Message", "{Message}")
            .MapProperty("Data", "{Data}")
            .MapProperty("SomeNumber", "{OffendingNumber}")
            .ThenThrowNewException();

            builder.UpdateConfigurationWithReplace(emptyConfigSource);

            ExceptionHandlingSettings settings = emptyConfigSource.GetSection(ExceptionHandlingSettings.SectionName) as ExceptionHandlingSettings;

            Assert.IsNotNull(settings);
            Assert.AreEqual(1, settings.ExceptionPolicies.Count);
            var policy = settings.ExceptionPolicies.Get("policy");

            Assert.IsNotNull(policy);
            Assert.AreEqual(1, policy.ExceptionTypes.Count);
            var configuredException = policy.ExceptionTypes.Get(0);

            Assert.AreEqual(typeof(NotFiniteNumberException), configuredException.Type);
            Assert.AreEqual(PostHandlingAction.ThrowNewException, configuredException.PostHandlingAction);
            Assert.AreEqual(1, configuredException.ExceptionHandlers.Count);

            var handler = configuredException.ExceptionHandlers.Get(0) as FaultContractExceptionHandlerData;

            Assert.IsNotNull(handler);
            Assert.AreEqual(typeof(MockFaultContract).AssemblyQualifiedName, handler.FaultContractType);
            Assert.AreEqual("fault message", handler.ExceptionMessage);
            Assert.AreEqual(3, handler.PropertyMappings.Count);
            Assert.IsNotNull(handler.PropertyMappings.SingleOrDefault(p => p.Name == "Message" && p.Source == "{Message}"));
            Assert.IsNotNull(handler.PropertyMappings.SingleOrDefault(p => p.Name == "Data" && p.Source == "{Data}"));
            Assert.IsNotNull(handler.PropertyMappings.SingleOrDefault(p => p.Name == "SomeNumber" && p.Source == "{OffendingNumber}"));

            var exceptionManager = settings.BuildExceptionManager();
            NotFiniteNumberException originalException = new NotFiniteNumberException("MyException", 555);

            originalException.Data.Add("someKey", "someValue");
            try
            {
                exceptionManager.HandleException(originalException, "policy");
                Assert.Fail("Should have thrown");
            }
            catch (FaultContractWrapperException ex)
            {
                MockFaultContract fault = (MockFaultContract)ex.FaultContract;
                Assert.AreEqual(originalException.Message, fault.Message);
                Assert.AreEqual(originalException.Data.Count, fault.Data.Count);
                Assert.AreEqual(originalException.Data["someKey"], fault.Data["someKey"]);
                Assert.AreEqual(originalException.OffendingNumber, fault.SomeNumber);
            }
        }
        public void Then_ConfigurationSourceContainsSecuritySettings()
        {
            IConfigurationSource source = new DictionaryConfigurationSource();

            configurationSourceBuilder.UpdateConfigurationWithReplace(source);

            Assert.IsNotNull(source.GetSection(SecuritySettings.SectionName));
        }
示例#8
0
        protected SecuritySettings GetSecuritySettings()
        {
            IConfigurationSource source = new DictionaryConfigurationSource();

            configurationSourceBuilder.UpdateConfigurationWithReplace(source);

            return((SecuritySettings)source.GetSection(SecuritySettings.SectionName));
        }
        public T GetSectionFromBuilder <T>(string name) where T : ConfigurationSection
        {
            IConfigurationSource source = new DictionaryConfigurationSource();

            Builder.UpdateConfigurationWithReplace(source);

            return((T)source.GetSection(name));
        }
示例#10
0
        public void Then_ConfigurationSourceContainsTypeRegistrationProviderSettings()
        {
            IConfigurationSource source = new DictionaryConfigurationSource();

            base.ConfigurationSourceBuilder.UpdateConfigurationWithReplace(source);

            Assert.IsNotNull(source.GetSection(TypeRegistrationProvidersConfigurationSection.SectionName));
        }
示例#11
0
        public void Then_ConfigurationSourceContainsLoggingSettings()
        {
            var configurationSource = new DictionaryConfigurationSource();

            ConfigurationSourceBuilder.UpdateConfigurationWithReplace(configurationSource);

            Assert.IsNotNull(configurationSource.GetSection(LoggingSettings.SectionName));
        }
示例#12
0
        protected LoggingSettings GetLoggingSettings()
        {
            DictionaryConfigurationSource configSource = new DictionaryConfigurationSource();

            this.builder.UpdateConfigurationWithReplace(configSource);

            return(configSource.GetSection(LoggingSettings.SectionName) as LoggingSettings);
        }
        protected ExceptionPolicyData GetExceptionPolicyData()
        {
            var source = new DictionaryConfigurationSource();

            configurationSourceBuilder.UpdateConfigurationWithReplace(source);

            return(((ExceptionHandlingSettings)source.GetSection(ExceptionHandlingSettings.SectionName))
                   .ExceptionPolicies.Get(policyName));
        }
        public void BuildsEmptyExceptionHandlingSettings()
        {
            DictionaryConfigurationSource emptyConfigSource = new DictionaryConfigurationSource();

            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureExceptionHandling();
            builder.UpdateConfigurationWithReplace(emptyConfigSource);

            var settings = emptyConfigSource.GetSection(ExceptionHandlingSettings.SectionName) as ExceptionHandlingSettings;

            Assert.IsNotNull(settings);
            Assert.AreEqual(0, settings.ExceptionPolicies.Count);
        }
        public void BuildsExceptionPolicyForNotifyRethrowPostHandlingAction()
        {
            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureExceptionHandling()
            .GivenPolicyWithName("EH")
            .ForExceptionType <Exception>().ThenNotifyRethrow();

            DictionaryConfigurationSource source = new DictionaryConfigurationSource();

            builder.UpdateConfigurationWithReplace(source);

            var  exceptionManager = ((ExceptionHandlingSettings)source.GetSection("exceptionHandling")).BuildExceptionManager();
            bool rethrow          = exceptionManager.HandleException(new Exception(), "EH");

            Assert.IsTrue(rethrow);
        }
示例#16
0
        protected override void Arrange()
        {
            base.Arrange();

            var builder = new ConfigurationSourceBuilder();

            builder.ConfigureData()
            .ForDatabaseNamed("someDatabase")
            .AsDefault();

            var source = new DictionaryConfigurationSource();

            builder.UpdateConfigurationWithReplace(source);

            ElementLookup   = Container.Resolve <ElementLookup>();
            DatabaseSection = (DatabaseSettings)source.GetSection(DatabaseSettings.SectionName);
        }
        protected override void Arrange()
        {
            base.Arrange();

            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureSecurity()
            .AuthorizeUsingCustomProviderNamed("custom authz", typeof(IAuthorizationProvider))
            .AuthorizeUsingRuleProviderNamed("ruleProvider")
            .SpecifyRule("rule1", "true")
            .SpecifyRule("rule2", "false")
            .CacheSecurityInCacheStoreNamed("cache Storage").WithOptions.UseSharedCacheManager("cache");

            DictionaryConfigurationSource source = new DictionaryConfigurationSource();

            builder.UpdateConfigurationWithReplace(source);


            securitySettings = (SecuritySettings)source.GetSection(SecuritySettings.SectionName);
        }
        public void BuildsCustomExceptionHandlerForThrowNewExceptionPostHandlingAction()
        {
            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureExceptionHandling()
            .GivenPolicyWithName("EH")
            .ForExceptionType <Exception>().HandleCustom <CustomExceptionHandler>().ThenThrowNewException();

            DictionaryConfigurationSource source = new DictionaryConfigurationSource();

            builder.UpdateConfigurationWithReplace(source);
            var exceptionManager = ((ExceptionHandlingSettings)source.GetSection("exceptionHandling")).BuildExceptionManager();

            ExceptionAssertHelper.Throws <NotImplementedException>(() => exceptionManager.HandleException(new Exception(), "EH"));

            Exception exception = null;
            bool      rethrow   = exceptionManager.HandleException(new Exception(), "EH", out exception);

            Assert.IsInstanceOfType(exception, typeof(NotImplementedException));
            Assert.IsTrue(rethrow);
        }
        public void BuildsReplaceExceptionHandlerWithMessageForThrowNewExceptionPostHandlingAction()
        {
            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureExceptionHandling()
            .GivenPolicyWithName("EH")
            .ForExceptionType <Exception>().ReplaceWith <InvalidCastException>().UsingMessage("string").ThenThrowNewException();

            DictionaryConfigurationSource source = new DictionaryConfigurationSource();

            builder.UpdateConfigurationWithReplace(source);

            var       exceptionManager = ((ExceptionHandlingSettings)source.GetSection("exceptionHandling")).BuildExceptionManager();
            Exception exception        = null;
            bool      rethrow          = exceptionManager.HandleException(new Exception(), "EH", out exception);

            Assert.IsInstanceOfType(exception, typeof(InvalidCastException));
            Assert.AreEqual("string", exception.Message);
            Assert.IsNull(exception.InnerException);
            Assert.IsTrue(rethrow);
        }
        protected override void Arrange()
        {
            base.Arrange();

            var sourceBuilder = new ConfigurationSourceBuilder();

            sourceBuilder.ConfigureCryptography()
            .EncryptUsingDPAPIProviderNamed("DPapi Provider")
            .EncryptUsingHashAlgorithmProviderNamed("HashAlgoProvider")
            .EncryptUsingKeyedHashAlgorithmProviderNamed("keyed hash provider")
            .EncryptUsingSymmetricAlgorithmProviderNamed("Symm Instance Provider")
            .EncryptUsingHashAlgorithmProviderNamed("Hash Provider 2");


            DictionaryConfigurationSource source = new DictionaryConfigurationSource();

            sourceBuilder.UpdateConfigurationWithReplace(source);

            CryptoConfiguration = (CryptographySettings)source.GetSection(CryptographySettings.SectionName);
            CryptographyModel   = SectionViewModel.CreateSection(Container, CryptographySettings.SectionName, CryptoConfiguration);
        }
        public void BuildsWrapExceptionHandlerForThrowNewExceptionPostHandlingAction()
        {
            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureExceptionHandling()
            .GivenPolicyWithName("EH")
            .ForExceptionType <Exception>().WrapWith <InvalidCastException>().ThenThrowNewException();

            DictionaryConfigurationSource source = new DictionaryConfigurationSource();

            builder.UpdateConfigurationWithReplace(source);

            var       exceptionManager  = ((ExceptionHandlingSettings)source.GetSection("exceptionHandling")).BuildExceptionManager();
            Exception originalException = new Exception();

            ExceptionAssertHelper.Throws <InvalidCastException>(() => exceptionManager.HandleException(originalException, "EH"));

            Exception exception = null;
            bool      rethrow   = exceptionManager.HandleException(originalException, "EH", out exception);

            Assert.IsInstanceOfType(exception, typeof(InvalidCastException));
            Assert.AreSame(originalException, exception.InnerException);
            Assert.IsTrue(rethrow);
        }
        protected override void Arrange()
        {
            base.Arrange();

            var builder = new ConfigurationSourceBuilder();

            builder.ConfigureData()
            .ForDatabaseNamed("SomeOracleDatabase")
            .ThatIs.AnOracleDatabase()
            .WithConnectionString("SomeOracleConnectionString")
            .ForDatabaseNamed("SomeOleDbDatabase")
            .ThatIs.AnOleDbDatabase()
            .WithConnectionString("Some OleDb ConnectionString")
            .AsDefault();

            var source = new DictionaryConfigurationSource();

            builder.UpdateConfigurationWithReplace(source);

            var configSourceModel = Container.Resolve <ConfigurationSourceModel>();

            configSourceModel.AddSection(DatabaseSettings.SectionName, source.GetSection(DatabaseSettings.SectionName));
            ConnectionStringSection = configSourceModel.AddSection("connectionStrings", source.GetSection("connectionStrings"));
        }
示例#23
0
        protected override void Arrange()
        {
            base.Arrange();

            DictionaryConfigurationSource source        = new DictionaryConfigurationSource();
            ConfigurationSourceBuilder    sourceBuilder = new ConfigurationSourceBuilder();

            sourceBuilder.ConfigureCaching()
            .ForCacheManagerNamed("Cache Manager 1")
            .StoreInMemory()
            .ForCacheManagerNamed("Cache Manager 2")
            .StoreInSharedBackingStore("database store")
            .ForCacheManagerNamed("Cache Manager 3")
            .StoreCacheMangerItemsInDatabase("database store")
            .EncryptUsing.SymmetricEncryptionProviderNamed("crypto thingy")
            .UsingSharedSymmetricEncryptionInstanceNamed("symm instance");

            sourceBuilder.UpdateConfigurationWithReplace(source);
            CachingConfiguration = (CacheManagerSettings)source.GetSection(CacheManagerSettings.SectionName);

            var sourceModel = Container.Resolve <ConfigurationSourceModel>();

            CachingViewModel = sourceModel.AddSection(CacheManagerSettings.SectionName, CachingConfiguration);
        }
示例#24
0
 public ConfigurationSection GetSection(String sectionName)
 {
     return(configurationSource.GetSection(sectionName));
 }
        public void BuildsLoggingExceptionHandlerWithFluentConfiguration()
        {
            DictionaryConfigurationSource configSource = new DictionaryConfigurationSource();

            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureExceptionHandling()
            .GivenPolicyWithName("Logging Policy")
            .ForExceptionType(typeof(DivideByZeroException))
            .LogToCategory("Sample Category")
            .UsingEventId(100)
            .UsingExceptionFormatter(typeof(TextExceptionFormatter))
            .UsingTitle("Sample Title")
            .WithPriority(4)
            .WithSeverity(TraceEventType.Transfer)
            .ThenDoNothing();

            builder.ConfigureLogging()
            .LogToCategoryNamed("Sample Category")
            .WithOptions
            .SetAsDefaultCategory()
            .ToSourceLevels(SourceLevels.All)
            .SendTo
            .EventLog("Default Listener")
            .UsingEventLogSource("ExceptionHandling.Bvt.Tests - Fluent")
            .FormatWith(
                new FormatterBuilder()
                .TextFormatterNamed("Default Text Formatter")
                .UsingTemplate("{message}"));

            builder.UpdateConfigurationWithReplace(configSource);

            ExceptionHandlingSettings settings = configSource.GetSection(ExceptionHandlingSettings.SectionName) as ExceptionHandlingSettings;

            Assert.IsNotNull(settings);
            Assert.AreEqual(1, settings.ExceptionPolicies.Count);
            var policy = settings.ExceptionPolicies.Get("Logging Policy");

            Assert.IsNotNull(policy);
            Assert.AreEqual(1, policy.ExceptionTypes.Count);
            var configuredException = policy.ExceptionTypes.Get(0);

            Assert.AreEqual(typeof(DivideByZeroException), configuredException.Type);
            Assert.AreEqual(PostHandlingAction.None, configuredException.PostHandlingAction);
            Assert.AreEqual(1, configuredException.ExceptionHandlers.Count);

            var handler = configuredException.ExceptionHandlers.Get(0) as LoggingExceptionHandlerData;

            Assert.IsNotNull(handler);
            Assert.AreEqual("Sample Category", handler.LogCategory);
            Assert.AreEqual(4, handler.Priority);
            Assert.AreEqual(TraceEventType.Transfer, handler.Severity);
            Assert.AreEqual("Sample Title", handler.Title);
            Assert.AreEqual(100, handler.EventId);
            Assert.AreEqual(typeof(TextExceptionFormatter), handler.FormatterType);

            var factory = new LogWriterFactory((e) => configSource.GetSection(e));

            Logger.SetLogWriter(factory.Create());
            var exceptionManager = settings.BuildExceptionManager();
            var exceptionTothrow = new DivideByZeroException("error message");

            exceptionManager.HandleException(exceptionTothrow, "Logging Policy");
            var entry = EventLogEntries.Last;

            Assert.IsTrue(entry.Message.Contains("Type : " + exceptionTothrow.GetType().FullName));
            Assert.IsTrue(entry.Message.Contains("Message : error message"));
        }
 public void WhenConfigSourceChangeIsSignaled_ThenSectionChangedIsInEventArgs()
 {
     Assert.IsNotNull(sectionChangedEventArgs);
     Assert.AreSame(configurationSource.GetSection(testsSectionName), sectionChangedEventArgs.Section);
 }
示例#27
0
        public void Then_ThereAreNoTypeRegistrations()
        {
            IConfigurationSource source = new DictionaryConfigurationSource();

            base.ConfigurationSourceBuilder.UpdateConfigurationWithReplace(source);

            TypeRegistrationProvidersConfigurationSection section = (TypeRegistrationProvidersConfigurationSection)source.GetSection(TypeRegistrationProvidersConfigurationSection.SectionName);

            Assert.AreEqual(0, section.TypeRegistrationProviders.Count);
        }
示例#28
0
        protected TypeRegistrationProvidersConfigurationSection GetTypeRegistrationSection()
        {
            IConfigurationSource source = new DictionaryConfigurationSource();

            base.ConfigurationSourceBuilder.UpdateConfigurationWithReplace(source);

            TypeRegistrationProvidersConfigurationSection section = (TypeRegistrationProvidersConfigurationSection)source.GetSection(TypeRegistrationProvidersConfigurationSection.SectionName);

            return(section);
        }
        public void BuildsWrapAndReplaceAndCustomExceptionHandlersForAllPostHandlingActions()
        {
            DictionaryConfigurationSource emptyConfigSource = new DictionaryConfigurationSource();

            ConfigurationSourceBuilder builder = new ConfigurationSourceBuilder();

            builder.ConfigureExceptionHandling()
            .GivenPolicyWithName("Sample Policy")
            .ForExceptionType(typeof(DivideByZeroException))
            .ReplaceWith(typeof(CustomException))
            .ThenDoNothing()
            .GivenPolicyWithName("Sample Policy 2")
            .ForExceptionType(typeof(InvalidCastException))
            .HandleCustom(typeof(CustomExceptionHandler))
            .ThenNotifyRethrow()
            .ForExceptionType(typeof(OutOfMemoryException))
            .WrapWith(typeof(OverflowException))
            .ThenThrowNewException();

            builder.UpdateConfigurationWithReplace(emptyConfigSource);

            ExceptionHandlingSettings settings = emptyConfigSource.GetSection(ExceptionHandlingSettings.SectionName) as ExceptionHandlingSettings;

            Assert.IsNotNull(settings);
            Assert.AreEqual(2, settings.ExceptionPolicies.Count);

            // Policy one
            var policy = settings.ExceptionPolicies.Get("Sample Policy");

            Assert.IsNotNull(policy);
            Assert.AreEqual(1, policy.ExceptionTypes.Count);
            var configuredException = policy.ExceptionTypes.Get(0);

            Assert.AreEqual(typeof(DivideByZeroException), configuredException.Type);
            Assert.AreEqual(PostHandlingAction.None, configuredException.PostHandlingAction);
            Assert.AreEqual(1, configuredException.ExceptionHandlers.Count);
            var handler = configuredException.ExceptionHandlers.Get(0) as ReplaceHandlerData;

            Assert.IsNotNull(handler);
            Assert.AreEqual(typeof(CustomException), handler.ReplaceExceptionType);

            // Policy 2
            policy = settings.ExceptionPolicies.Get("Sample Policy 2");
            Assert.IsNotNull(policy);
            Assert.AreEqual(2, policy.ExceptionTypes.Count);
            configuredException = policy.ExceptionTypes.Get(0);
            Assert.AreEqual(typeof(InvalidCastException), configuredException.Type);
            Assert.AreEqual(PostHandlingAction.NotifyRethrow, configuredException.PostHandlingAction);
            Assert.AreEqual(1, configuredException.ExceptionHandlers.Count);
            var customHandler = configuredException.ExceptionHandlers.Get(0) as CustomHandlerData;

            Assert.IsNotNull(customHandler);
            Assert.AreEqual(typeof(CustomExceptionHandler), customHandler.Type);
            configuredException = policy.ExceptionTypes.Get(1);
            Assert.AreEqual(typeof(OutOfMemoryException), configuredException.Type);
            Assert.AreEqual(PostHandlingAction.ThrowNewException, configuredException.PostHandlingAction);
            Assert.AreEqual(1, configuredException.ExceptionHandlers.Count);
            var wrapHandler = configuredException.ExceptionHandlers.Get(0) as WrapHandlerData;

            Assert.IsNotNull(wrapHandler);
            Assert.AreEqual(typeof(OverflowException), wrapHandler.WrapExceptionType);
        }