< Summary

Class:SharpHoundCommonLib.OutputTypes.GPLink
Assembly:SharpHoundCommonLib
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\CommonLib\OutputTypes\GPLink.cs
Covered lines:11
Uncovered lines:5
Coverable lines:16
Total lines:36
Line coverage:68.7% (11 of 16)
Covered branches:5
Total branches:12
Branch coverage:41.6% (5 of 12)

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
Equals(...)50%20100%
Equals(...)50%60100%
GetHashCode()0%200%

File(s)

D:\a\SharpHoundCommon\SharpHoundCommon\src\CommonLib\OutputTypes\GPLink.cs

#LineLine coverage
 1namespace SharpHoundCommonLib.OutputTypes
 2{
 3    public class GPLink
 4    {
 5        private string _guid;
 6
 127        public bool IsEnforced { get; set; }
 8
 9        public string GUID
 10        {
 011            get => _guid;
 612            set => _guid = value?.ToUpper();
 13        }
 14
 15        protected bool Equals(GPLink other)
 316        {
 317            return _guid == other._guid && IsEnforced == other.IsEnforced;
 318        }
 19
 20        public override bool Equals(object obj)
 321        {
 322            if (ReferenceEquals(null, obj)) return false;
 323            if (ReferenceEquals(this, obj)) return true;
 324            if (obj.GetType() != GetType()) return false;
 325            return Equals((GPLink) obj);
 326        }
 27
 28        public override int GetHashCode()
 029        {
 30            unchecked
 031            {
 032                return ((_guid != null ? _guid.GetHashCode() : 0) * 397) ^ IsEnforced.GetHashCode();
 33            }
 034        }
 35    }
 36}