< Summary

Class:AvatarAssetsTestHelpers
Assembly:AvatarAssetsTest_Helpers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Models/AvatarAssets/Tests/Helpers/AvatarAssetsTestHelpers.cs
Covered lines:13
Uncovered lines:0
Coverable lines:13
Total lines:37
Line coverage:100% (13 of 13)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
CreateTestCatalogLocal()0%660100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Models/AvatarAssets/Tests/Helpers/AvatarAssetsTestHelpers.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using DCL.Helpers;
 3using System.Linq;
 4using UnityEngine;
 5
 6public static class AvatarAssetsTestHelpers
 7{
 8    public static BaseDictionary<string, WearableItem> CreateTestCatalogLocal()
 9    {
 5310        List<WearableItemDummy> wearables = Object.Instantiate(Resources.Load<WearableItemDummyListVariable>("TestCatalo
 318011        foreach (var wearableItem in wearables)
 12        {
 153713            wearableItem.baseUrl = TestAssetsUtils.GetPath() + "/Avatar/Assets/";
 14
 657215            foreach (var rep in wearableItem.data.representations)
 16            {
 174917                rep.contents = rep.contents.Select((x) =>
 18                    {
 386919                        x.hash = x.key;
 386920                        return x;
 21                    })
 22                    .ToArray();
 23            }
 24
 153725            wearableItem.thumbnail = "";
 26        }
 27
 5328        CatalogController.wearableCatalog.Clear();
 159029        var dummyWereables = wearables.Select(x => new KeyValuePair<string, WearableItem>(x.id, x)).ToArray();
 318030        foreach (var item in dummyWereables)
 31        {
 153732            CatalogController.wearableCatalog.Add(item.Key, item.Value);
 33        }
 34
 5335        return CatalogController.wearableCatalog;
 36    }
 37}

Methods/Properties

CreateTestCatalogLocal()