< Summary

Class:UserStatus
Assembly:FriendsController
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/FriendsController/UserStatus.cs
Covered lines:4
Uncovered lines:10
Coverable lines:14
Total lines:42
Line coverage:28.5% (4 of 14)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Equals(...)0%30500%
Equals(...)0%62.6512029.41%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/FriendsController/UserStatus.cs

#LineLine coverage
 1using System;
 2using DCL.Social.Friends;
 3using UnityEngine;
 4
 5[Serializable]
 6public class UserStatus
 7{
 8    [Serializable]
 9    public class Realm
 10    {
 11        public string serverName;
 12        public string layer;
 13
 14        public override bool Equals(object obj)
 15        {
 016            if (this == obj) return true;
 017            if (!(obj is Realm other)) return false;
 018            if (serverName != other.serverName) return false;
 019            if (layer != other.layer) return false;
 020            return true;
 21        }
 22    }
 23
 24    public Realm realm;
 25    public Vector2 position;
 26    public string userId;
 27    public FriendshipStatus friendshipStatus;
 28    public PresenceStatus presence;
 29
 30    public override bool Equals(object obj)
 31    {
 132        if (this == obj) return true;
 133        if (!(obj is UserStatus other)) return false;
 134        if (realm != null && other.realm == null) return false;
 235        if (realm == null && other.realm != null) return false;
 036        if (realm != null && !realm.Equals(other.realm)) return false;
 037        if (position != other.position) return false;
 038        if (userId != other.userId) return false;
 039        if (friendshipStatus != other.friendshipStatus) return false;
 040        return true;
 41    }
 42}