< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using System;
 2using UnityEngine;
 3
 4[Serializable]
 5public class UserStatus
 6{
 7    [Serializable]
 8    public class Realm
 9    {
 10        public string serverName;
 11        public string layer;
 12
 13        public override bool Equals(object obj)
 14        {
 015            if (this == obj) return true;
 016            if (!(obj is Realm other)) return false;
 017            if (serverName != other.serverName) return false;
 018            if (layer != other.layer) return false;
 019            return true;
 20        }
 21    }
 22
 23    public Realm realm;
 24    public Vector2 position;
 25    public string userId;
 26    public FriendshipStatus friendshipStatus;
 27    public PresenceStatus presence;
 28    [NonSerialized] public DateTime friendshipStartedTime;
 29
 30    public override bool Equals(object obj)
 31    {
 032        if (this == obj) return true;
 033        if (!(obj is UserStatus other)) return false;
 034        if (realm != null && other.realm == null) return false;
 035        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        if (friendshipStartedTime != other.friendshipStartedTime) return false;
 041        return true;
 42    }
 43}