Appccelerate.Bootstrapper.Configuration.Internals.LoadConfigurationSection.GetSection C# (CSharp) Method

GetSection() public method

Gets a configuration section according to the specified name.
public GetSection ( string sectionName ) : ConfigurationSection
sectionName string The section name.
return System.Configuration.ConfigurationSection
        public ConfigurationSection GetSection(string sectionName)
        {
            return this.sectionProvider(sectionName);
        }
    }

Usage Example

        public void GetSection_ExtensionIsILoadExtensionConfigurationSection_ShouldDelegateLoadingToExtension()
        {
            var extension = new Mock<IExtension>();
            var loader = extension.As<ILoadConfigurationSection>();

            var testee = new LoadConfigurationSection(extension.Object);
            testee.GetSection(AnyName);

            loader.Verify(l => l.GetSection(AnyName));
        }