< Summary

Class:QuestsBridge
Assembly:QuestsBridge
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Bridges/QuestsBridge/QuestsBridge.cs
Covered lines:1
Uncovered lines:9
Coverable lines:10
Total lines:27
Line coverage:10% (1 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
InitializeQuests(...)0%2100%
UpdateQuestProgress(...)0%2100%
RemoveQuest(...)0%2100%
OnDestroy()0%220100%

File(s)

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

#LineLine coverage
 1using DCL.QuestsController;
 2using System.Collections.Generic;
 3using UnityEngine;
 4using DCL.Helpers;
 5
 6public class QuestsBridge : MonoBehaviour
 7{
 8    public void InitializeQuests(string jsonMessage)
 9    {
 010        var parsedQuests = Utils.ParseJsonArray<List<QuestModel>>(jsonMessage);
 011        QuestsController.i.InitializeQuests(parsedQuests);
 012    }
 13
 14    public void UpdateQuestProgress(string jsonMessage)
 15    {
 016        var progressedQuest = JsonUtility.FromJson<QuestModel>(jsonMessage);
 017        QuestsController.i.UpdateQuestProgress(progressedQuest);
 018    }
 19
 20    public void RemoveQuest(string jsonMessage)
 21    {
 022        var quest = JsonUtility.FromJson<QuestModel>(jsonMessage);
 023        QuestsController.i.RemoveQuest(quest);
 024    }
 25
 10426    private void OnDestroy() { QuestsController.i?.Dispose(); }
 27}