< Summary

Class:DCL.ContentModeration.ContentModerationReportingOptionComponentView
Assembly:ContentModerationHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/ContentModerationHUD/ContentModerationReportingOptionComponentView.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:39
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:6
Method coverage:0% (0 of 6)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
RefreshControl()0%2100%
SetOptionText(...)0%2100%
SelectOption()0%2100%
UnselectOption()0%2100%
SetActive(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/ContentModerationHUD/ContentModerationReportingOptionComponentView.cs

#LineLine coverage
 1using TMPro;
 2using UnityEngine;
 3using UnityEngine.UI;
 4
 5namespace DCL.ContentModeration
 6{
 7    public class ContentModerationReportingOptionComponentView : BaseComponentView
 8    {
 9        [SerializeField] private Button optionButton;
 10        [SerializeField] private TMP_Text optionText;
 11        [SerializeField] private Image optionBackground;
 12        [SerializeField] internal Color backgroundUnselectedColor;
 13        [SerializeField] internal Color textUnselectedColor;
 14        [SerializeField] internal Color backgroundSelectedColor;
 15        [SerializeField] internal Color textSelectedColor;
 16
 017        public Button OptionButton => optionButton;
 18
 019        public override void RefreshControl() { }
 20
 21        public void SetOptionText(string text) =>
 022            optionText.text = text;
 23
 24        public void SelectOption()
 25        {
 026            optionBackground.color = backgroundSelectedColor;
 027            optionText.color = textSelectedColor;
 028        }
 29
 30        public void UnselectOption()
 31        {
 032            optionBackground.color = backgroundUnselectedColor;
 033            optionText.color = textUnselectedColor;
 034        }
 35
 36        public void SetActive(bool isActive) =>
 037            gameObject.SetActive(isActive);
 38    }
 39}