< Summary

Class:UserProfileModel
Assembly:UserProfile
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/UserProfile/UserProfileModel.cs
Covered lines:6
Uncovered lines:2
Coverable lines:8
Total lines:61
Line coverage:75% (6 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
UserProfileModel()0%110100%
Clone()0%2100%
ComposeCorrectUrl(...)0%4.134080%

File(s)

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

#LineLine coverage
 1using System.Collections.Generic;
 2
 3[System.Serializable]
 4public class UserProfileModel
 5{
 6    [System.Serializable]
 7    public class Snapshots
 8    {
 9        public string face256;
 10        public string body;
 11    }
 12
 13    [System.Serializable]
 14    public class ParcelsWithAccess
 15    {
 16        public int x;
 17        public int y;
 18        public LandRole landRole;
 19
 20        [System.Serializable]
 21        public enum LandRole
 22        {
 23            OWNER = 0,
 24            OPERATOR = 1
 25        }
 26    }
 27
 28    public string userId;
 29    public string ethAddress;
 30    public string name;
 31    public string email;
 32    public string description;
 33    public string baseUrl;
 34    public ParcelsWithAccess[] parcelsWithAccess;
 35    public ulong created_at;
 36    public ulong updated_at;
 37    public int version;
 38    public AvatarModel avatar;
 119839    public Snapshots snapshots = new Snapshots();
 040    public UserProfileModel Clone() => (UserProfileModel)MemberwiseClone();
 41
 119842    public bool hasConnectedWeb3 = true;
 43
 44    public int tutorialFlagsMask;
 45    public List<string> blocked;
 46    public List<string> muted;
 47    public int tutorialStep;
 48    public bool hasClaimedName = false;
 49
 50
 51    public string ComposeCorrectUrl(string url)
 52    {
 10653        if (string.IsNullOrEmpty(url))
 9854            return url;
 55
 856        if (!url.StartsWith("Qm") && !url.StartsWith("ba"))
 857            return url;
 58
 059        return baseUrl + url;
 60    }
 61}