< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.WebHttpSecurityElement
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/WebHttpSecurityElement.cs
Line coverage
75%
Covered lines: 6
Uncovered lines: 2
Coverable lines: 8
Total lines: 34
Line coverage: 75%
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
ApplyConfiguration(...)50%2280%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/WebHttpSecurityElement.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 WebHttpSecurityElement : ServiceModelConfigurationElement
 9    {
 10        [ConfigurationProperty(ConfigurationStrings.Mode, DefaultValue = WebHttpSecurityMode.None)]
 11        public WebHttpSecurityMode Mode
 12        {
 313            get { return (WebHttpSecurityMode)base[ConfigurationStrings.Mode]; }
 014            set { base[ConfigurationStrings.Mode] = value; }
 15        }
 16
 17        [ConfigurationProperty(ConfigurationStrings.Transport)]
 18        public HttpTransportSecurityElement Transport
 19        {
 220            get { return (HttpTransportSecurityElement)base[ConfigurationStrings.Transport]; }
 21        }
 22
 23        internal void ApplyConfiguration(WebHttpSecurity security)
 24        {
 225            if (security == null)
 26            {
 027                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(security));
 28            }
 29
 230            security.Mode = Mode;
 231            Transport.ApplyConfiguration(security.Transport);
 232        }
 33    }
 34}