< 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:5
Uncovered lines:3
Coverable lines:8
Total lines:27
Line coverage:62.5% (5 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
DataStore_EmotesCustomization()0%110100%
FilterOutNotOwnedEquippedEmotes(...)0%2100%

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 FilterOutNotOwnedEquippedEmotes(IEnumerable<WearableItem> emotes)
 22        {
 023            var filtered = equippedEmotes.Get().Where(x => emotes.Any(y => x.id == y.id) ).ToArray();
 024            equippedEmotes.Set(filtered);
 025        }
 26    }
 27}