< Summary

Class:DCL.Emotes.EmoteBodyId
Assembly:EmotesServiceDefinitions
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLServices/EmotesService/Domain/EmoteBodyId.cs
Covered lines:7
Uncovered lines:5
Coverable lines:12
Total lines:32
Line coverage:58.3% (7 of 12)
Covered branches:0
Total branches:0
Covered methods:4
Total methods:7
Method coverage:57.1% (4 of 7)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
EmoteBodyId(...)0%110100%
ToString()0%2100%
Equals(...)0%6200%
Equals(...)0%20400%
GetHashCode()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLServices/EmotesService/Domain/EmoteBodyId.cs

#LineLine coverage
 1using System;
 2
 3namespace DCL.Emotes
 4{
 5    public class EmoteBodyId
 6    {
 7487        public string BodyShapeId { get; }
 7488        public string EmoteId { get; }
 9
 74910        public EmoteBodyId(string bodyShapeId, string emoteId)
 11        {
 74912            this.BodyShapeId = bodyShapeId;
 74913            this.EmoteId = emoteId;
 74914        }
 15
 16        public override string ToString() =>
 017            $"{BodyShapeId}:{EmoteId}";
 18
 19        private bool Equals(EmoteBodyId other) =>
 020            BodyShapeId == other.BodyShapeId && EmoteId == other.EmoteId;
 21
 22        public override bool Equals(object obj)
 23        {
 024            if (ReferenceEquals(null, obj)) return false;
 025            if (ReferenceEquals(this, obj)) return true;
 026            return obj.GetType() == this.GetType() && Equals((EmoteBodyId)obj);
 27        }
 28
 29        public override int GetHashCode() =>
 74830            HashCode.Combine(BodyShapeId, EmoteId);
 31    }
 32}