< Summary

Class:BIWUrlUtils
Assembly:BIWUrls
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/Scripts/Utils/Url/BIWUrlUtils.cs
Covered lines:7
Uncovered lines:5
Coverable lines:12
Total lines:40
Line coverage:58.3% (7 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetUrlSceneObjectContent()0%110100%
GetManifestJSON(...)0%2100%
GetBuilderAPIBaseUrl()0%110100%
GetBuilderProjecThumbnailUrl(...)0%2100%
GetUrlAssetPackContent()0%110100%
GetResolvedEnviromentUrl(...)0%110100%
IsMainNet()0%110100%
GetEnvBase()0%2.152066.67%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/Scripts/Utils/Url/BIWUrlUtils.cs

#LineLine coverage
 1using DCL.Configuration;
 2
 3public static class BIWUrlUtils
 4{
 1105    public static string GetUrlSceneObjectContent() { return BIWSettings.BASE_URL_SCENE_OBJECT_CONTENT.Replace("{ENV}", 
 6
 07    public static string GetManifestJSON(string jsonManifest) { return "{\"manifest\":" + jsonManifest + "}"; }
 8
 9    public static string GetBuilderAPIBaseUrl()
 10    {
 811        return GetResolvedEnviromentUrl(BIWSettings.BASE_URL_BUILDER_API);
 12    }
 13
 14    public static string GetBuilderProjecThumbnailUrl(string projectId, string filename)
 15    {
 016        string resolvedUrl = GetResolvedEnviromentUrl(BIWSettings.BASE_URL_BUILDER_PROJECT_THUMBNAIL);
 017        resolvedUrl = resolvedUrl.Replace("{id}", projectId) +filename;
 018        return resolvedUrl;
 19    }
 20
 3221    public static string GetUrlAssetPackContent() { return GetResolvedEnviromentUrl(BIWSettings.BASE_URL_ASSETS_PACK_CON
 22
 23    private static string GetResolvedEnviromentUrl(string url)
 24    {
 4025        return url.Replace("{ENV}", GetEnvBase());
 26    }
 27
 28    private static bool IsMainNet()
 29    {
 15030        return KernelConfig.i.Get().network == "mainnet";
 31    }
 32
 33    private static string GetEnvBase()
 34    {
 15035        if (IsMainNet())
 15036            return "org";
 37
 038        return "io";
 39    }
 40}