< Summary

Class:DCL.AssetPromise_PrefetchGLTF
Assembly:AssetPromiseKeeper
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/AssetManager/GLTF/AssetPromise_PrefetchGLTF.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:37
Line coverage:0% (0 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AssetPromise_PrefetchGLTF(...)0%2100%
OnBeforeLoadOrReuse()0%2100%
ParseGLTFWebRequestedFile(...)0%2100%
OnReuse(...)0%2100%
AddToLibrary()0%2100%
Load()0%6200%
OnCancelLoading()0%2100%
GetAsset(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/AssetManager/GLTF/AssetPromise_PrefetchGLTF.cs

#LineLine coverage
 1using System;
 2
 3namespace DCL
 4{
 5    public class AssetPromise_PrefetchGLTF : AssetPromise_GLTF
 6    {
 07        public AssetPromise_PrefetchGLTF(ContentProvider provider, string url, string hash) : base(provider, url, hash) 
 8
 09        protected override void OnBeforeLoadOrReuse() { asset.container.name = "GLTF: " + fileName; }
 10
 011        void ParseGLTFWebRequestedFile(ref string requestedFileName) { provider.TryGetContentsUrl(assetDirectoryPath + r
 12
 013        protected override void OnReuse(Action OnSuccess) { asset.Show(false, OnSuccess); }
 14
 15        protected override bool AddToLibrary()
 16        {
 017            library.Add(asset);
 018            return true;
 19        }
 20
 21        internal override void Load()
 22        {
 023            if (!library.Contains(GetId()))
 24            {
 025                base.Load();
 26            }
 27            else
 28            {
 029                CallAndClearEvents(false, new Exception("The asset already exists in the library"));
 30            }
 031        }
 32
 033        protected override void OnCancelLoading() { base.OnCancelLoading(); }
 34
 035        protected override Asset_GLTF GetAsset(object id) { return library.Get(id); }
 36    }
 37}