< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.IdentityModel.Protocols.WSTrust.Status
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/Status.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 14
Coverable lines: 14
Total lines: 67
Line coverage: 0%
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(...)0%220%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/Status.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
 4namespace CoreWCF.IdentityModel.Protocols.WSTrust
 5{
 6    /// <summary>
 7    /// A class encapsulating the result of a WS-Trust request.
 8    /// </summary>
 9    public class Status
 10    {
 11        private string _code;
 12        private string _reason;
 13
 14        /// <summary>
 15        /// Creates an instance of Status
 16        /// </summary>
 17        /// <param name="code">Status code.</param>
 18        /// <param name="reason">Optional status reason.</param>
 019        public Status(string code, string reason)
 20        {
 021            if (string.IsNullOrEmpty(code))
 22            {
 023                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(code));
 24            }
 25
 026            _code = code;
 027            _reason = reason;
 028        }
 29
 30        /// <summary>
 31        /// Gets or sets the status code for the validation binding in the RSTR.
 32        /// </summary>
 33        public string Code
 34        {
 35            get
 36            {
 037                return _code;
 38            }
 39
 40            set
 41            {
 042                if (string.IsNullOrEmpty(value))
 43                {
 044                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("code");
 45                }
 46
 047                _code = value;
 048            }
 49        }
 50
 51        /// <summary>
 52        /// Gets or sets the optional status reason for the validation binding in the RSTR.
 53        /// </summary>
 54        public string Reason
 55        {
 56            get
 57            {
 058                return _reason;
 59            }
 60
 61            set
 62            {
 063                _reason = value;
 064            }
 65        }
 66    }
 67}