< Summary

Class:DCLLockedOnEdit
Assembly:DCL.Components.Builder
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/BuilderInWorld/DCLLockedOnEdit.cs
Covered lines:4
Uncovered lines:4
Coverable lines:8
Total lines:39
Line coverage:50% (4 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetDataFromJSON(...)0%2100%
DCLLockedOnEdit()0%110100%
GetClassId()0%110100%
SetIsLocked(...)0%2100%
ApplyChanges(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/BuilderInWorld/DCLLockedOnEdit.cs

#LineLine coverage
 1using DCL;
 2using DCL.Components;
 3using DCL.Controllers;
 4using DCL.Helpers;
 5using DCL.Models;
 6using System.Collections;
 7using System.Collections.Generic;
 8using UnityEngine;
 9
 10/// <summary>
 11/// This component describes the lock status of the Entity in the builder in world.
 12/// Builder in World send a message to kernel to change the value of this component in order to lock/unlock it
 13/// </summary>
 14public class DCLLockedOnEdit : BaseDisposable
 15{
 16    [System.Serializable]
 17    public class Model : BaseModel
 18    {
 19        public bool isLocked;
 20
 021        public override BaseModel GetDataFromJSON(string json) { return Utils.SafeFromJson<Model>(json); }
 22    }
 23
 15324    public DCLLockedOnEdit() { model = new Model(); }
 25
 2526    public override int GetClassId() { return (int) CLASS_ID.LOCKED_ON_EDIT; }
 27
 28    public void SetIsLocked(bool value)
 29    {
 030        Model model = (Model) this.model;
 031        model.isLocked = value;
 032    }
 33
 34    public override IEnumerator ApplyChanges(BaseModel baseModel)
 35    {
 5036        RaiseOnAppliedChanges();
 5037        return null;
 38    }
 39}