< Summary

Class:DCL.Components.SmartItemComponent
Assembly:MainScripts
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/SmartItem/SmartItemComponent.cs
Covered lines:3
Uncovered lines:3
Coverable lines:6
Total lines:29
Line coverage:50% (3 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Model()0%110100%
GetDataFromJSON(...)0%2100%
Awake()0%110100%
ApplyChanges()0%220100%
GetClassId()0%2100%
GetValues()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/SmartItem/SmartItemComponent.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using DCL.Controllers;
 4using DCL.Helpers;
 5using DCL.Models;
 6using Newtonsoft.Json;
 7
 8namespace DCL.Components
 9{
 10    public class SmartItemComponent : BaseComponent
 11    {
 12        public class Model : BaseModel
 13        {
 14            public string assetId;
 15            public string src;
 616            public Dictionary<object, object> values = new Dictionary<object, object>();
 17
 018            public override BaseModel GetDataFromJSON(string json) { return JsonConvert.DeserializeObject<Model>(json); 
 19        }
 20
 621        private void Awake() { model = new Model(); }
 22
 423        public override IEnumerator ApplyChanges(BaseModel newModel) { yield break; }
 24
 025        public override int GetClassId() { return (int) CLASS_ID_COMPONENT.SMART_ITEM; }
 26
 027        public Dictionary<object, object> GetValues() { return ((Model)model).values; }
 28    }
 29}