< Summary

Class:CatalogItem
Assembly:BuilderInWorldCatalogData
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/Scripts/Catalog/CatalogData/Model/CatalogItem.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:56
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetThumbnailUrl()0%2100%
SetFavorite(...)0%2100%
IsFavorite()0%2100%
IsNFT()0%2100%
IsSmartItem()0%2100%
IsVoxel()0%2100%
HasActions()0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/BuilderInWorld/Scripts/Catalog/CatalogData/Model/CatalogItem.cs

#LineLine coverage
 1using DCL.Components;
 2using DCL.Configuration;
 3using DCL.Helpers.NFT;
 4using System.Collections;
 5using System.Collections.Generic;
 6using UnityEngine;
 7
 8public class CatalogItem
 9{
 10    public enum ItemType
 11    {
 12        SCENE_OBJECT = 0,
 13        NFT = 1,
 14        SMART_ITEM = 2
 15    }
 16
 17    public string id;
 18    public ItemType itemType;
 19
 20    public string name;
 21    public string model;
 22    public string assetPackName;
 23
 24    public List<string> tags;
 25    public string category;
 26    public string categoryName;
 27    public Dictionary<string, string> contents;
 28
 29    public SceneObject.ObjectMetrics metrics;
 30    public SmartItemParameter[] parameters;
 31    public SmartItemAction[] actions;
 32    public bool isVoxel = false;
 33    public string thumbnailURL;
 34
 35    private bool isFavorite = false;
 36
 037    public string GetThumbnailUrl() => thumbnailURL;
 38
 039    public void SetFavorite(bool isFavorite) => this.isFavorite = isFavorite;
 40
 041    public bool IsFavorite() => isFavorite;
 42
 043    public bool IsNFT() => itemType == ItemType.NFT;
 44
 045    public bool IsSmartItem() => itemType == ItemType.SMART_ITEM;
 46
 047    public bool IsVoxel() => isVoxel;
 48
 49    public bool HasActions()
 50    {
 051        if (actions.Length > 0)
 052            return true;
 53
 054        return false;
 55    }
 56}