< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.ServiceModelSectionGroup
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ServiceModelSectionGroup.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 35
Line coverage: 85.7%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor()100%11100%
GetSectionGroup(...)50%2266.66%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ServiceModelSectionGroup.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System.Configuration;
 5
 6namespace CoreWCF.Configuration
 7{
 8    public sealed class ServiceModelSectionGroup : ConfigurationSectionGroup
 9    {
 4610        public ServiceModelSectionGroup()
 11        {
 4612        }
 13
 14        public BindingsSection Bindings
 15        {
 24516            get { return (BindingsSection)Sections[ConfigurationStrings.BindingsSectionGroupName]; }
 17        }
 18
 19        public ServicesSection Services
 20        {
 4021            get { return (ServicesSection)Sections[ConfigurationStrings.ServicesSectionName]; }
 22        }
 23
 24
 25        public static ServiceModelSectionGroup GetSectionGroup(System.Configuration.Configuration config)
 26        {
 4627            if (config == null)
 28            {
 029                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(config));
 30            }
 31
 4632            return (ServiceModelSectionGroup)config.SectionGroups[ConfigurationStrings.SectionGroupName];
 33        }
 34    }
 35}