< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Security.WSTrustDec2005
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/WSTrustDec2005.cs
Line coverage
37%
Covered lines: 6
Uncovered lines: 10
Coverable lines: 16
Total lines: 49
Line coverage: 37.5%
Branch coverage
0%
Covered branches: 0
Total branches: 4
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%11100%
.ctor(...)100%11100%
IsSecondaryParametersElement(...)0%220%
CreateKeyWrapAlgorithmElement(...)0%220%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/WSTrustDec2005.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.Xml;
 5
 6namespace CoreWCF.Security
 7{
 8    internal class WSTrustDec2005 : WSTrustFeb2005
 9    {
 10        public WSTrustDec2005(WSSecurityTokenSerializer tokenSerializer)
 6711            : base(tokenSerializer)
 12        {
 6713        }
 14
 16215        public override TrustDictionary SerializerDictionary => DXD.TrustDec2005Dictionary;
 16
 17        public class DriverDec2005 : DriverFeb2005
 18        {
 19            public DriverDec2005(SecurityStandardsManager standardsManager)
 6720                : base(standardsManager)
 21            {
 6722            }
 23
 65624            public override TrustDictionary DriverDictionary => DXD.TrustDec2005Dictionary;
 25
 026            public override XmlDictionaryString RequestSecurityTokenResponseFinalAction => DXD.TrustDec2005Dictionary.Re
 27
 28            internal virtual bool IsSecondaryParametersElement(XmlElement element)
 29            {
 030                return ((element.LocalName == DXD.TrustDec2005Dictionary.SecondaryParameters.Value) &&
 031                        (element.NamespaceURI == DXD.TrustDec2005Dictionary.Namespace.Value));
 32            }
 33
 34            public virtual XmlElement CreateKeyWrapAlgorithmElement(string keyWrapAlgorithm)
 35            {
 036                if (keyWrapAlgorithm == null)
 37                {
 038                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(keyWrapAlgorithm));
 39                }
 40
 041                XmlDocument doc = new XmlDocument();
 042                XmlElement result = doc.CreateElement(DXD.TrustDec2005Dictionary.Prefix.Value, DXD.TrustDec2005Dictionar
 043                    DXD.TrustDec2005Dictionary.Namespace.Value);
 044                result.AppendChild(doc.CreateTextNode(keyWrapAlgorithm));
 045                return result;
 46            }
 47        }
 48    }
 49}