< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.ServiceModelConfigurationElementCollection<T>
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ServiceModelConfigurationElementCollection.cs
Line coverage
80%
Covered lines: 8
Uncovered lines: 2
Coverable lines: 10
Total lines: 36
Line coverage: 80%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor()100%11100%
.ctor(...)100%22100%
.ctor(...)100%110%
CreateNewElement()100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ServiceModelConfigurationElementCollection.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;
 5using System.Collections;
 6using System.Configuration;
 7
 8namespace CoreWCF.Configuration
 9{
 10    public abstract class ServiceModelConfigurationElementCollection<TConfigurationElementType> : ConfigurationElementCo
 11        where TConfigurationElementType : ConfigurationElement, new()
 12    {
 13        internal ServiceModelConfigurationElementCollection()
 214            : this(ConfigurationElementCollectionType.AddRemoveClearMap, null)
 215        { }
 16
 25117        internal ServiceModelConfigurationElementCollection(ConfigurationElementCollectionType collectionType,
 25118            string elementName)
 19        {
 25120            if (!String.IsNullOrEmpty(elementName))
 21            {
 24922                AddElementName = elementName;
 23            }
 25124        }
 25
 26        internal ServiceModelConfigurationElementCollection(ConfigurationElementCollectionType collectionType,
 027            string elementName, IComparer comparer) : base(comparer)
 28        {
 029        }
 30
 31        protected override ConfigurationElement CreateNewElement()
 32        {
 4433            return new TConfigurationElementType();
 34        }
 35    }
 36}