< Summary

Class:MainScripts.DCL.ServiceProviders.OpenSea.Interfaces.NFTInfo
Assembly:OpenSeaInterfaces
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/ServiceProviders/OpenSea/Interfaces/OpenSeaDomainTypes.cs
Covered lines:5
Uncovered lines:1
Coverable lines:6
Total lines:89
Line coverage:83.3% (5 of 6)
Covered branches:0
Total branches:0
Covered methods:1
Total methods:2
Method coverage:50% (1 of 2)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Equals(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/ServiceProviders/OpenSea/Interfaces/OpenSeaDomainTypes.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5namespace MainScripts.DCL.ServiceProviders.OpenSea.Interfaces
 6{
 7    public struct OwnNFTInfo
 8    {
 9        public string ethAddress;
 10        public List<NFTInfo> assets;
 11
 12        public static OwnNFTInfo Default
 13        {
 14            get
 15            {
 16                var ret = new OwnNFTInfo();
 17                ret.ethAddress = "0x0000000000000000000000000000000000000000";
 18                ret.assets = new List<NFTInfo>();
 19                return ret;
 20            }
 21        }
 22    }
 23
 24    [Serializable]
 25    public struct NFTOwner
 26    {
 27        public string address;
 28        public int quantity;
 29    }
 30
 31    public struct NFTInfo
 32    {
 33        public string name;
 34        public string tokenId;
 35        public string description;
 36        public string owner;
 37        public long numSales;
 38        public string imageUrl;
 39        public string thumbnailUrl;
 40        public string previewImageUrl;
 41        public string originalImageUrl;
 42        public string assetLink;
 43        public string marketLink;
 44        public string lastSaleDate;
 45        public string lastSaleAmount;
 46        public PaymentTokenInfo? lastSaleToken;
 47        public Color? backgroundColor;
 48        public MarketInfo? marketInfo;
 49        public string currentPrice;
 50        public PaymentTokenInfo? currentPriceToken;
 51        public AssetContract assetContract;
 52        public NFTOwner[] owners;
 53
 54        public static NFTInfo Default
 55        {
 56            get
 57            {
 4258                NFTInfo ret = new NFTInfo();
 4259                ret.owner = "0x0000000000000000000000000000000000000000";
 4260                ret.numSales = 0;
 4261                ret.assetContract = new AssetContract();
 4262                return ret;
 63            }
 64        }
 65
 66        public bool Equals(string assetContract, string tokenId) =>
 067            this.assetContract.address.ToLower() == assetContract.ToLower()
 68            && this.tokenId == tokenId;
 69    }
 70
 71    [Serializable]
 72    public struct PaymentTokenInfo
 73    {
 74        public string symbol;
 75    }
 76
 77    [Serializable]
 78    public struct MarketInfo
 79    {
 80        public string name;
 81    }
 82
 83    [Serializable]
 84    public struct AssetContract
 85    {
 86        public string address;
 87        public string name;
 88    }
 89}