< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.IdentityModel.Tokens.AbsoluteUriCollection
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/AbsoluteUriCollection.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
Total lines: 38
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 8
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%
InsertItem(...)0%440%
SetItem(...)0%440%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/AbsoluteUriCollection.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.Collections.ObjectModel;
 6
 7namespace CoreWCF.IdentityModel.Tokens
 8{
 9    /// <summary>
 10    /// A collection of absolute URIs.
 11    /// </summary>
 12    internal class AbsoluteUriCollection : Collection<Uri>
 13    {
 014        public AbsoluteUriCollection()
 15        {
 016        }
 17
 18        protected override void InsertItem(int index, Uri item)
 19        {
 020            if (null == item || !item.IsAbsoluteUri)
 21            {
 022                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(nameof(item), SR.Format(SR.ID0013));
 23            }
 24
 025            base.InsertItem(index, item);
 026        }
 27
 28        protected override void SetItem(int index, Uri item)
 29        {
 030            if (null == item || !item.IsAbsoluteUri)
 31            {
 032                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(nameof(item), SR.Format(SR.ID0013));
 33            }
 34
 035            base.SetItem(index, item);
 036        }
 37    }
 38}