< Summary

Class:NFTShape_Internal.NFTAssetFactory
Assembly:MainScripts
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/LoadableShapes/NFTShape/Scripts/NFTAssetFactory.cs
Covered lines:4
Uncovered lines:1
Coverable lines:5
Total lines:25
Line coverage:80% (4 of 5)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
CreateAsset(...)0%3.073080%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/LoadableShapes/NFTShape/Scripts/NFTAssetFactory.cs

#LineLine coverage
 1using System;
 2using DCL;
 3using UnityEngine;
 4
 5namespace NFTShape_Internal
 6{
 7    public static class NFTAssetFactory
 8    {
 9        public static INFTAsset CreateAsset(ITexture asset, NFTShapeConfig shapeConfig,
 10            Action<Texture2D> textureUpdateCallback, GifPlayer gifPlayer)
 11        {
 912            if (asset == null)
 13            {
 214                return null;
 15            }
 16
 717            if (asset is Asset_Gif gif)
 18            {
 019                return new NFTGifAsset(gif, shapeConfig.hqGifResolution, gifPlayer);
 20            }
 21
 722            return new NFTImageAsset(asset, shapeConfig.hqImgResolution, textureUpdateCallback);
 23        }
 24    }
 25}