< Summary

Class:DCL.Chat.HUD.PromoteChannelsToastComponentView
Assembly:WorldChatWindowHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/WorldChatWindowHUD/PromoteChannelsToastComponentView.cs
Covered lines:6
Uncovered lines:1
Coverable lines:7
Total lines:33
Line coverage:85.7% (6 of 7)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Awake()0%110100%
RefreshControl()0%2100%
Show()0%110100%
Hide()0%110100%
Create()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/WorldChatWindowHUD/PromoteChannelsToastComponentView.cs

#LineLine coverage
 1using System;
 2using UnityEngine;
 3
 4namespace DCL.Chat.HUD
 5{
 6    public class PromoteChannelsToastComponentView : BaseComponentView, IPromoteChannelsToastComponentView
 7    {
 8        [SerializeField] internal ButtonComponentView closeButton;
 9
 10        public event Action OnClose;
 11
 12        public override void Awake()
 13        {
 314            base.Awake();
 15
 416            closeButton.onClick.AddListener(() => OnClose?.Invoke());
 317        }
 18
 19        public override void RefreshControl()
 20        {
 021        }
 22
 123        public void Show() => gameObject.SetActive(true);
 24
 125        public void Hide() => gameObject.SetActive(false);
 26
 27        public static PromoteChannelsToastComponentView Create()
 28        {
 329            return Instantiate(
 30                Resources.Load<PromoteChannelsToastComponentView>("SocialBarV1/PromoteChannelsHUD"));
 31        }
 32    }
 33}