< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Security.Tokens.ServiceX509SecurityTokenProvider
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/Tokens/ServiceX509SecurityTokenProvider.cs
Line coverage
60%
Covered lines: 3
Uncovered lines: 2
Coverable lines: 5
Total lines: 28
Line coverage: 60%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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%110%
GetTokenCore(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/Tokens/ServiceX509SecurityTokenProvider.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.Security.Cryptography.X509Certificates;
 6using CoreWCF.IdentityModel.Selectors;
 7using CoreWCF.IdentityModel.Tokens;
 8
 9namespace CoreWCF.Security.Tokens
 10{
 11    internal class ServiceX509SecurityTokenProvider : X509SecurityTokenProvider
 12    {
 13        public ServiceX509SecurityTokenProvider(X509Certificate2 certificate)
 514            : base(certificate)
 15        {
 516        }
 17
 18        public ServiceX509SecurityTokenProvider(StoreLocation storeLocation, StoreName storeName, X509FindType findType,
 019            : base(storeLocation, storeName, findType, findValue)
 20        {
 021        }
 22
 23        protected override SecurityToken GetTokenCore(TimeSpan timeout)
 24        {
 525            return new X509SecurityToken(Certificate, false, false);
 26        }
 27    }
 28}