< Summary

Class:UserProfileModelDTO
Assembly:UserProfile
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/UserProfile/UserProfileModelDTO.cs
Covered lines:0
Uncovered lines:4
Coverable lines:4
Total lines:84
Line coverage:0% (0 of 4)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:2
Method coverage:0% (0 of 2)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
UserProfileModelDTO()0%2100%
ToUserProfileModel()0%6200%

File(s)

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

#LineLine coverage
 1using DCL.UserProfiles;
 2using System;
 3using System.Collections.Generic;
 4
 5[Serializable]
 6public class UserProfileModelDTO
 7{
 8    public string userId;
 9    public string ethAddress;
 10    public string name;
 11    public string email;
 12    public string description;
 13    public string baseUrl;
 14    public UserProfileModel.ParcelsWithAccess[] parcelsWithAccess;
 15    public ulong created_at;
 16    public ulong updated_at;
 17    public int version;
 18    public AvatarModelDTO avatar;
 019    public UserProfileModel.Snapshots snapshots = new ();
 20
 021    public bool hasConnectedWeb3 = true;
 22
 23    public int tutorialFlagsMask;
 24    public List<string> blocked;
 25    public List<string> muted;
 26    public int tutorialStep;
 27    public bool hasClaimedName = false;
 28    public List<UserProfileModel.Link> links;
 29
 30    public string country;
 31    public string employmentStatus;
 32    public string gender;
 33    public string pronouns;
 34    public string relationshipStatus;
 35    public string sexualOrientation;
 36    public string language;
 37    public string profession;
 38    public long birthdate;
 39    public string realName;
 40    public string hobbies;
 41
 42    public UserProfileModel ToUserProfileModel()
 43    {
 044        UserProfileModel userProfileModel = new UserProfileModel
 45            {
 46                userId = this.userId,
 47                ethAddress = this.ethAddress,
 48                name = this.name,
 49                email = this.email,
 50                description = this.description,
 51                baseUrl = this.baseUrl,
 52                parcelsWithAccess = this.parcelsWithAccess,
 53                created_at = this.created_at,
 54                updated_at = this.updated_at,
 55                version = this.version,
 56                avatar = this.avatar.ToAvatarModel(),
 57                snapshots = this.snapshots,
 58                hasConnectedWeb3 = this.hasConnectedWeb3,
 59                tutorialFlagsMask = this.tutorialFlagsMask,
 60                blocked = this.blocked,
 61                muted = this.muted,
 62                tutorialStep = this.tutorialStep,
 63                hasClaimedName = this.hasClaimedName,
 64                links = this.links,
 65                AdditionalInfo = new AdditionalInfo
 66                {
 67                    Country = this.country,
 68                    EmploymentStatus = this.employmentStatus,
 69                    Gender = this.gender,
 70                    Pronouns = this.pronouns,
 71                    RelationshipStatus = this.relationshipStatus,
 72                    SexualOrientation = this.sexualOrientation,
 73                    Language = this.language,
 74                    Profession = this.profession,
 75                    BirthDate = birthdate == 0 ? null : DateTimeOffset.FromUnixTimeSeconds(this.birthdate).DateTime,
 76                    RealName = this.realName,
 77                    Hobbies = this.hobbies,
 78                },
 79            };
 80
 081        return userProfileModel;
 82    }
 83
 84}