< Summary

Class:AvatarEditorHUDModel
Assembly:AvatarEditorHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/AvatarEditorHUD/Scripts/AvatarEditorHUDModel.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:29
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AvatarEditorHUDModel()0%110100%
ToAvatarModel()0%220100%
GetWearable(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/AvatarEditorHUD/Scripts/AvatarEditorHUDModel.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Linq;
 3using UnityEngine;
 4
 5public class AvatarEditorHUDModel
 6{
 7    public WearableItem bodyShape;
 488    public List<WearableItem> wearables = new List<WearableItem>();
 9    public Color hairColor;
 10    public Color skinColor;
 11    public Color eyesColor;
 12
 13    public AvatarModel ToAvatarModel()
 14    {
 10415        return new AvatarModel()
 16        {
 17            bodyShape = bodyShape.id,
 66018            wearables = wearables.Select(x => x.id).ToList(),
 19            hairColor = hairColor,
 20            skinColor = skinColor,
 21            eyeColor = eyesColor
 22        };
 23    }
 24
 25    public WearableItem GetWearable(string category)
 26    {
 9127        return wearables.FirstOrDefault(x => x.data.category == category);
 28    }
 29}