< Summary

Class:DCL.UserProfiles.AdditionalInfo
Assembly:UserProfile
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/UserProfile/AdditionalInfo.cs
Covered lines:31
Uncovered lines:13
Coverable lines:44
Total lines:76
Line coverage:70.4% (31 of 44)
Covered branches:0
Total branches:0
Covered methods:26
Total methods:27
Method coverage:96.2% (26 of 27)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AdditionalInfo()0%110100%
AdditionalInfo(...)0%110100%
CopyFrom(...)0%110100%
Equals(...)0%23.8213060%
GetHashCode()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/UserProfile/AdditionalInfo.cs

#LineLine coverage
 1using System;
 2
 3namespace DCL.UserProfiles
 4{
 5    public record AdditionalInfo
 6    {
 15957        public string Country { get; set; }
 15958        public string EmploymentStatus { get; set; }
 15959        public string Gender { get; set; }
 159510        public string Pronouns { get; set; }
 159511        public string RelationshipStatus { get; set; }
 159512        public string SexualOrientation { get; set; }
 159513        public string Language { get; set; }
 159514        public string Profession { get; set; }
 159715        public DateTime? BirthDate { get; set; }
 159516        public string RealName { get; set; }
 159517        public string Hobbies { get; set; }
 18
 151419        public AdditionalInfo()
 20        {
 151421        }
 22
 2223        public AdditionalInfo(AdditionalInfo other)
 24        {
 2225            CopyFrom(other);
 2226        }
 27
 28        public void CopyFrom(AdditionalInfo additionalInfo)
 29        {
 74230            Country = additionalInfo.Country;
 74231            EmploymentStatus = additionalInfo.EmploymentStatus;
 74232            Gender = additionalInfo.Gender;
 74233            Pronouns = additionalInfo.Pronouns;
 74234            RelationshipStatus = additionalInfo.RelationshipStatus;
 74235            SexualOrientation = additionalInfo.SexualOrientation;
 74236            Language = additionalInfo.Language;
 74237            Profession = additionalInfo.Profession;
 74238            BirthDate = additionalInfo.BirthDate;
 74239            RealName = additionalInfo.RealName;
 74240            Hobbies = additionalInfo.Hobbies;
 74241        }
 42
 43        public virtual bool Equals(AdditionalInfo other)
 44        {
 2145            if (ReferenceEquals(null, other)) return false;
 2146            if (ReferenceEquals(this, other)) return true;
 2147            return Country == other.Country && EmploymentStatus == other.EmploymentStatus
 48                                            && Gender == other.Gender
 49                                            && Pronouns == other.Pronouns
 50                                            && RelationshipStatus == other.RelationshipStatus
 51                                            && SexualOrientation == other.SexualOrientation
 52                                            && Language == other.Language
 53                                            && Profession == other.Profession
 54                                            && Nullable.Equals(BirthDate, other.BirthDate)
 55                                            && RealName == other.RealName
 56                                            && Hobbies == other.Hobbies;
 57        }
 58
 59        public override int GetHashCode()
 60        {
 061            var hashCode = new HashCode();
 062            hashCode.Add(Country);
 063            hashCode.Add(EmploymentStatus);
 064            hashCode.Add(Gender);
 065            hashCode.Add(Pronouns);
 066            hashCode.Add(RelationshipStatus);
 067            hashCode.Add(SexualOrientation);
 068            hashCode.Add(Language);
 069            hashCode.Add(Profession);
 070            hashCode.Add(BirthDate);
 071            hashCode.Add(RealName);
 072            hashCode.Add(Hobbies);
 073            return hashCode.ToHashCode();
 74        }
 75    }
 76}