< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Security.SendSecurityHeaderElement
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/SendSecurityHeaderElement.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
Total lines: 34
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%110%
IsSameItem(...)0%220%
Replace(...)100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/SendSecurityHeaderElement.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 ISecurityElement = CoreWCF.IdentityModel.ISecurityElement;
 5
 6namespace CoreWCF.Security
 7{
 8    internal class SendSecurityHeaderElement
 9    {
 010        public SendSecurityHeaderElement(string id, ISecurityElement item)
 11        {
 012            Id = id;
 013            Item = item;
 014            MarkedForEncryption = false;
 015        }
 16
 017        public string Id { get; private set; }
 18
 019        public ISecurityElement Item { get; private set; }
 20
 021        public bool MarkedForEncryption { get; set; }
 22
 23        public bool IsSameItem(ISecurityElement item)
 24        {
 025            return Item == item || Item.Equals(item);
 26        }
 27
 28        public void Replace(string id, ISecurityElement item)
 29        {
 030            Item = item;
 031            Id = id;
 032        }
 33    }
 34}