< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.IdentityModel.Tokens.SigningCredentials
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/SigningCredentials.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 18
Coverable lines: 18
Total lines: 52
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 6
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%
.ctor(...)0%660%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/SigningCredentials.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;
 5
 6namespace CoreWCF.IdentityModel.Tokens
 7{
 8    public class SigningCredentials
 9    {
 10        private string _signatureAlgorithm;
 11        private SecurityKeyIdentifier _signingKeyIdentifier;
 12
 13        public SigningCredentials(SecurityKey signingKey, string signatureAlgorithm, string digestAlgorithm) :
 014            this(signingKey, signatureAlgorithm, digestAlgorithm, null)
 015        { }
 16
 017        public SigningCredentials(SecurityKey signingKey, string signatureAlgorithm, string digestAlgorithm, SecurityKey
 18        {
 019            if (signingKey == null)
 20            {
 021                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(signingKey)))
 22            }
 23
 024            if (signatureAlgorithm == null)
 25            {
 026                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(signatureAlgo
 27            }
 028            if (digestAlgorithm == null)
 29            {
 030                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(digestAlgorit
 31            }
 032            SigningKey = signingKey;
 033            _signatureAlgorithm = signatureAlgorithm;
 034            DigestAlgorithm = digestAlgorithm;
 035            _signingKeyIdentifier = signingKeyIdentifier;
 036        }
 37
 038        public string DigestAlgorithm { get; }
 39
 40        public string SignatureAlgorithm
 41        {
 042            get { return _signatureAlgorithm; }
 43        }
 44
 045        public SecurityKey SigningKey { get; }
 46
 47        public SecurityKeyIdentifier SigningKeyIdentifier
 48        {
 049            get { return _signingKeyIdentifier; }
 50        }
 51    }
 52}