< Summary

Class:DCL.RealmsInfoBridge
Assembly:RealmsInfoBridge
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Bridges/RealmsInfoBridge/RealmsInfoBridge.cs
Covered lines:1
Uncovered lines:7
Coverable lines:8
Total lines:29
Line coverage:12.5% (1 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
RealmsInfoBridge()0%110100%
UpdateRealmsInfo(...)0%2100%
ConnectionToRealmSuccess(...)0%6200%
ConnectionToRealmFailed(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Bridges/RealmsInfoBridge/RealmsInfoBridge.cs

#LineLine coverage
 1using DCL.Helpers;
 2using System;
 3using UnityEngine;
 4using static DCL.Interface.WebInterface;
 5
 6namespace DCL
 7{
 8    public class RealmsInfoBridge : MonoBehaviour
 9    {
 10        public static event Action<JumpInPayload> OnRealmConnectionSuccess;
 11        public static event Action<JumpInPayload> OnRealmConnectionFailed;
 12
 5313        RealmsInfoHandler handler = new RealmsInfoHandler();
 14
 015        public void UpdateRealmsInfo(string payload) { handler.Set(payload); }
 16
 17        public void ConnectionToRealmSuccess(string json)
 18        {
 019            var realmConnectionSuccessPayload = Utils.SafeFromJson<JumpInPayload>(json);
 020            OnRealmConnectionSuccess?.Invoke(realmConnectionSuccessPayload);
 021        }
 22
 23        public void ConnectionToRealmFailed(string json)
 24        {
 025            var realmConnectionFailedPayload = Utils.SafeFromJson<JumpInPayload>(json);
 026            OnRealmConnectionFailed?.Invoke(realmConnectionFailedPayload);
 027        }
 28    }
 29}