< Summary

Class:DCL.ECSComponents.UITextComponentHandler
Assembly:DCL.ECSComponents.UIText
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIText/Handler/UITextComponentHandler.cs
Covered lines:4
Uncovered lines:4
Coverable lines:8
Total lines:36
Line coverage:50% (4 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
UITextComponentHandler(...)0%2100%
OnComponentCreated(...)0%2100%
OnComponentRemoved(...)0%110100%
OnComponentModelUpdated(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIText/Handler/UITextComponentHandler.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using DCL.Controllers;
 4using DCL.ECS7.UI;
 5using DCL.ECSRuntime;
 6using DCL.Models;
 7using UnityEngine;
 8using UnityEngine.UIElements;
 9using Random = UnityEngine.Random;
 10
 11namespace DCL.ECSComponents
 12{
 13    public class UITextComponentHandler : IECSComponentHandler<PBUiText>
 14    {
 15        private readonly IUIDataContainer uiDataContainer;
 16
 017        public UITextComponentHandler(IUIDataContainer dataContainer)
 18        {
 019            this.uiDataContainer = dataContainer;
 020        }
 21
 22        public void OnComponentCreated(IParcelScene scene, IDCLEntity entity)
 23        {
 024        }
 25
 26        public void OnComponentRemoved(IParcelScene scene, IDCLEntity entity)
 27        {
 128            uiDataContainer.RemoveUIText(scene,entity);
 129        }
 30
 31        public void OnComponentModelUpdated(IParcelScene scene, IDCLEntity entity, PBUiText model)
 32        {
 133            uiDataContainer.AddUIComponent(scene,entity, model);
 134        }
 35    }
 36}