< Summary

Class:DCL.MyAccount.MyProfileLinkComponentView
Assembly:MyAccountHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/MyAccountHUD/MyProfileLinkComponentView.cs
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:27
Line coverage:0% (0 of 5)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:2
Method coverage:0% (0 of 2)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Awake()0%2100%
Set(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/MyAccountHUD/MyProfileLinkComponentView.cs

#LineLine coverage
 1using System;
 2using TMPro;
 3using UnityEngine;
 4using UnityEngine.UI;
 5
 6namespace DCL.MyAccount
 7{
 8    public class MyProfileLinkComponentView : MonoBehaviour
 9    {
 10        [SerializeField] private TMP_Text titleLabel;
 11        [SerializeField] private TMP_Text urlLabel;
 12        [SerializeField] private Button removeButton;
 13
 14        public event Action<(string title, string url)> OnRemoved;
 15
 16        private void Awake()
 17        {
 018            removeButton.onClick.AddListener(() => OnRemoved?.Invoke((titleLabel.text, urlLabel.text)));
 019        }
 20
 21        public void Set(string title, string url)
 22        {
 023            titleLabel.text = title;
 024            urlLabel.text = url;
 025        }
 26    }
 27}