< Summary

Class:ShortcutsController
Assembly:BuildModeHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/HUD/BuildModeHUD/Scripts/Common/ShortcutsController.cs
Covered lines:6
Uncovered lines:0
Coverable lines:6
Total lines:29
Line coverage:100% (6 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Initialize(...)0%110100%
Dispose()0%110100%
SetActive(...)0%110100%
CloseButtonClicked()0%220100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/HUD/BuildModeHUD/Scripts/Common/ShortcutsController.cs

#LineLine coverage
 1public interface IShortcutsController
 2{
 3    event System.Action OnCloseClick;
 4
 5    void Initialize(IShortcutsView publishPopupView);
 6    void Dispose();
 7    void SetActive(bool isActive);
 8    void CloseButtonClicked();
 9}
 10
 11public class ShortcutsController : IShortcutsController
 12{
 13    public event System.Action OnCloseClick;
 14
 15    internal IShortcutsView publishPopupView;
 16
 17    public void Initialize(IShortcutsView publishPopupView)
 18    {
 319        this.publishPopupView = publishPopupView;
 20
 321        publishPopupView.OnCloseButtonClick += CloseButtonClicked;
 322    }
 23
 624    public void Dispose() { publishPopupView.OnCloseButtonClick -= CloseButtonClicked; }
 25
 426    public void SetActive(bool isActive) { publishPopupView.SetActive(isActive); }
 27
 228    public void CloseButtonClicked() { OnCloseClick?.Invoke(); }
 29}