< 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:15
Coverable lines:15
Total lines:39
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AssetPromise_PrefetchGLTF(...)0%2100%
OnBeforeLoadOrReuse()0%2100%
GetId()0%2100%
OnLoad(...)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
 1namespace DCL
 2{
 3    public class AssetPromise_PrefetchGLTF : AssetPromise_GLTF
 4    {
 05        public AssetPromise_PrefetchGLTF(ContentProvider provider, string url, string hash) : base(provider, url, hash) 
 6
 07        protected override void OnBeforeLoadOrReuse() { asset.container.name = "GLTF: " + fileName; }
 8
 09        public override object GetId() { return base.GetId(); }
 10
 011        protected override void OnLoad(System.Action OnSuccess, System.Action OnFail) { base.OnLoad(OnSuccess, OnFail); 
 12
 013        void ParseGLTFWebRequestedFile(ref string requestedFileName) { provider.TryGetContentsUrl(assetDirectoryPath + r
 14
 015        protected override void OnReuse(System.Action OnSuccess) { asset.Show(false, OnSuccess); }
 16
 17        protected override bool AddToLibrary()
 18        {
 019            library.Add(asset);
 020            return true;
 21        }
 22
 23        internal override void Load()
 24        {
 025            if (!library.Contains(GetId()))
 26            {
 027                base.Load();
 028            }
 29            else
 30            {
 031                CallAndClearEvents(false);
 32            }
 033        }
 34
 035        protected override void OnCancelLoading() { base.OnCancelLoading(); }
 36
 037        protected override Asset_GLTF GetAsset(object id) { return library.Get(id); }
 38    }
 39}