< Summary

Class:DCLServices.Lambdas.NamesService.NamesResponse
Assembly:NamesService
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLServices/Lambdas/NamesService/NamesResponse.cs
Covered lines:6
Uncovered lines:6
Coverable lines:12
Total lines:45
Line coverage:50% (6 of 12)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:7
Method coverage:28.5% (2 of 7)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
NameEntry()0%2100%
NameEntry(...)0%110100%
GetNftInfo()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLServices/Lambdas/NamesService/NamesResponse.cs

#LineLine coverage
 1using Newtonsoft.Json;
 2using System;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6namespace DCLServices.Lambdas.NamesService
 7{
 8    [Serializable]
 9    public class NamesResponse : PaginatedResponse
 10    {
 11        [Serializable]
 12        public class NameEntry
 13        {
 14            [JsonProperty] private string name;
 15            [JsonProperty] private string contractAddress;
 16            [JsonProperty] private string price;
 17
 618            public string Name => name;
 019            public string ContractAddress => contractAddress;
 020            public string Price => price;
 21
 022            public NameEntry()
 23            {
 024            }
 25
 326            public NameEntry(string name, string contractAddress, string price)
 27            {
 328                this.name = name;
 329                this.contractAddress = contractAddress;
 330                this.price = price;
 331            }
 32
 33            public NftInfo GetNftInfo() =>
 034                new()
 35                {
 36                    Id = contractAddress,
 37                    Category = "name",
 38                };
 39        }
 40
 41        [JsonProperty] private List<NameEntry> elements;
 42
 043        public IReadOnlyList<NameEntry> Elements => elements;
 44    }
 45}