< Summary

Information
Class: MRA.DTO.Models.CollectionModel
Assembly: MRA.DTO
File(s): D:\a\MiguelRomerART\MiguelRomerART\MRA.DTO\Models\CollectionModel.cs
Line coverage
62%
Covered lines: 10
Uncovered lines: 6
Coverable lines: 16
Total lines: 45
Line coverage: 62.5%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%11100%
get_Name()100%11100%
get_Description()100%11100%
get_Order()100%11100%
get_Drawings()100%11100%
get_DrawingIds()100%11100%
.ctor()100%11100%
ToString()0%620%
GetId()100%210%

File(s)

D:\a\MiguelRomerART\MiguelRomerART\MRA.DTO\Models\CollectionModel.cs

#LineLine coverage
 1using Google.Cloud.Firestore;
 2using MRA.DTO.Models.Interfaces;
 3using System;
 4using System.Collections.Generic;
 5using System.Linq;
 6using System.Text;
 7using System.Text.Json.Serialization;
 8using System.Threading.Tasks;
 9
 10namespace MRA.DTO.Models;
 11
 12public class CollectionModel : IModel
 13{
 5414    public string Id { get; set; }
 2915    public string Name { get; set; }
 2916    public string Description { get; set; }
 1717    public int Order { get; set; }
 18
 19    [JsonIgnore]
 8720    public IEnumerable<DrawingModel> Drawings { get; set; }
 21
 6822    public IEnumerable<string> DrawingIds { get; set; }
 23
 2124    public CollectionModel()
 25    {
 2126        Drawings = new List<DrawingModel>();
 2127        DrawingIds = new List<string>();
 2128    }
 29
 30    public override string ToString()
 31    {
 032        StringBuilder sb = new StringBuilder();
 33
 034        sb.Append(Id);
 35
 036        if (!String.IsNullOrEmpty(Name))
 37        {
 038            sb.Append($" ({Name})");
 39        }
 40
 041        return sb.ToString();
 42    }
 43
 044    public string GetId() => Id;
 45}