< Summary

Class:DCL.DataStore_EmotesCustomization
Assembly:DataStore
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DataStore/DataStore_EmotesCustomization.cs
Covered lines:11
Uncovered lines:1
Coverable lines:12
Total lines:34
Line coverage:91.6% (11 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
DataStore_EmotesCustomization()0%110100%
UnequipMissingEmotes(...)0%6.036090.91%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DataStore/DataStore_EmotesCustomization.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Linq;
 3using UnityEngine;
 4
 5namespace DCL
 6{
 7    public class EquippedEmoteData
 8    {
 9        public string id;
 10        public Sprite cachedThumbnail;
 11    }
 12
 13    public class DataStore_EmotesCustomization
 14    {
 6915        public readonly BaseVariable<bool> isWheelInitialized = new BaseVariable<bool>(false);
 6916        public readonly BaseCollection<EquippedEmoteData> unsavedEquippedEmotes = new BaseCollection<EquippedEmoteData>(
 6917        public readonly BaseCollection<EquippedEmoteData> equippedEmotes = new BaseCollection<EquippedEmoteData>(new Lis
 6918        public readonly BaseVariable<bool> isEmotesCustomizationSelected = new BaseVariable<bool>(false);
 6919        public readonly BaseCollection<string> currentLoadedEmotes = new BaseCollection<string>();
 20
 21        public void UnequipMissingEmotes(IEnumerable<WearableItem> emotes)
 22        {
 4323            var setOfIds = new HashSet<string>();
 275224            foreach (var emote in emotes)
 133325                setOfIds.Add(emote.id);
 26
 94627            for (int i = 0; i < equippedEmotes.Count(); i++)
 28            {
 43029                if (equippedEmotes[i] != null && !setOfIds.Contains(equippedEmotes[i].id))
 030                    equippedEmotes[i] = null;
 31            }
 4332        }
 33    }
 34}