< Summary

Class:FeatureFlagBridge
Assembly:FeatureFlag
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/FeatureFlags/FeatureFlagBridge.cs
Covered lines:3
Uncovered lines:9
Coverable lines:12
Total lines:32
Line coverage:25% (3 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SetFeatureFlagConfiguration(...)0%12300%
SetFeatureFlagConfiguration(...)0%2.062075%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/FeatureFlags/FeatureFlagBridge.cs

#LineLine coverage
 1using System;
 2using System.Collections;
 3using System.Collections.Generic;
 4using DCL;
 5using Newtonsoft.Json;
 6using UnityEngine;
 7
 8public class FeatureFlagBridge : MonoBehaviour
 9{
 10    public void SetFeatureFlagConfiguration(string json)
 11    {
 012        FeatureFlag config = null;
 13        try
 14        {
 015            config = JsonConvert.DeserializeObject<FeatureFlag>(json);
 016        }
 017        catch (Exception e)
 18        {
 019            Debug.LogError("FeatureFlag has been unable to parse the json! Error: " + e);
 020        }
 21
 022        SetFeatureFlagConfiguration(config);
 023    }
 24
 25    public void SetFeatureFlagConfiguration(FeatureFlag config)
 26    {
 127        if (config == null)
 028            return;
 29
 130        DataStore.i.featureFlags.flags.Set(config);
 131    }
 32}