< Summary

Class:UsersAroundListHUDButtonView
Assembly:UsersAroundListHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/UsersAroundListHUD/UsersAroundListHUDButtonView.cs
Covered lines:2
Uncovered lines:2
Coverable lines:4
Total lines:19
Line coverage:50% (2 of 4)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SetUsersCount(...)0%2100%
ToggleUsersCount(...)0%110100%
OnPointerDown(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/UsersAroundListHUD/UsersAroundListHUDButtonView.cs

#LineLine coverage
 1using System;
 2using TMPro;
 3using UnityEngine;
 4using UnityEngine.EventSystems;
 5
 6public class UsersAroundListHUDButtonView : MonoBehaviour, IUsersAroundListHUDButtonView, IPointerDownHandler
 7{
 8    [SerializeField] private TextMeshProUGUI usersCountText;
 9
 010    public void SetUsersCount(int count) { usersCountText.text = count.ToString(); }
 11
 12    public event Action OnClick;
 13    public void ToggleUsersCount(bool isEnabled)
 14    {
 115        usersCountText.gameObject.SetActive(isEnabled);
 116    }
 17
 018    void IPointerDownHandler.OnPointerDown(PointerEventData eventData) { OnClick?.Invoke(); }
 19}