< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Description.EndpointAuthorizationBehavior
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Description/EndpointAuthorizationBehavior.cs
Line coverage
90%
Covered lines: 10
Uncovered lines: 1
Coverable lines: 11
Total lines: 38
Line coverage: 90.9%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
AddBindingParameters(...)100%11100%
ApplyClientBehavior(...)100%110%
ApplyDispatchBehavior(...)100%22100%
Validate(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Description/EndpointAuthorizationBehavior.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 CoreWCF.Channels;
 5using CoreWCF.Dispatcher;
 6
 7namespace CoreWCF.Description;
 8
 9internal class EndpointAuthorizationBehavior : IEndpointBehavior
 10{
 11    public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
 12    {
 13
 67314    }
 15
 16    public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 17    {
 18
 019    }
 20
 21    public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
 22    {
 64123        BindingParameterCollection parameters = new() { endpoint.Binding };
 64124        var authorizationCapabilities = endpoint.Binding.GetProperty<IAuthorizationCapabilities>(parameters);
 64125        if (authorizationCapabilities != null)
 26        {
 42727            endpointDispatcher.DispatchRuntime.RequireClaimsPrincipalOnOperationContext =
 42728                authorizationCapabilities.SupportsAuthorizationData;
 42729            endpointDispatcher.DispatchRuntime.SupportsAuthorizationData =
 42730                authorizationCapabilities.SupportsAuthorizationData;
 31        }
 64132    }
 33
 34    public void Validate(ServiceEndpoint endpoint)
 35    {
 36
 64137    }
 38}