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

Metrics

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

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{
 07    public WearableItem bodyShape = new WearableItem { id = "NOT_LOADED" };
 08    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    {
 015        return new AvatarModel()
 16        {
 17            bodyShape = bodyShape.id,
 018            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    {
 027        return wearables.FirstOrDefault(x => x.data.category == category);
 28    }
 29}