< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.StandardBindingElementCollection<T>
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/StandardBindingElementCollection.cs
Line coverage
83%
Covered lines: 5
Uncovered lines: 1
Coverable lines: 6
Total lines: 27
Line coverage: 83.3%
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%
GetElementKey(...)50%2275%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/StandardBindingElementCollection.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 class StandardBindingElementCollection<TBindingConfiguration> : ServiceModelEnhancedConfigurationElementColle
 9        where TBindingConfiguration : ConfigurationElement, IDefaultCommunicationTimeouts, IStandardBindingElement, new(
 10    {
 11        public StandardBindingElementCollection()
 24512            : base(ConfigurationStrings.Binding)
 13        {
 24514        }
 15
 16        protected override object GetElementKey(ConfigurationElement element)
 17        {
 13318            if (element == null)
 19            {
 020                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(element));
 21            }
 22
 13323            TBindingConfiguration configElementKey = (TBindingConfiguration)element;
 13324            return configElementKey.Name;
 25        }
 26    }
 27}