< Summary - Syki

Information
Class: Syki.Shared.GetCampiItemOut
Assembly: Shared
File(s): /home/runner/work/syki/syki/Shared/Features/Academic/GetCampi/GetCampiOut.cs
Tag: 21_17346963026
Line coverage
80%
Covered lines: 8
Uncovered lines: 2
Coverable lines: 10
Total lines: 86
Line coverage: 80%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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_State()100%11100%
get_City()100%11100%
get_Capacity()100%11100%
get_Students()100%11100%
get_Teachers()100%11100%
get_FillRate()100%11100%
GetFillRate()100%210%
ToString()100%210%

File(s)

/home/runner/work/syki/syki/Shared/Features/Academic/GetCampi/GetCampiOut.cs

#LineLine coverage
 1namespace Syki.Shared;
 2
 3public class GetCampiOut
 4{
 5    public int Total { get; set; }
 6    public List<GetCampiItemOut> Items { get; set; } = [];
 7
 8    public static IEnumerable<(string, GetCampiOut)> GetExamples() =>
 9    [
 10        ("Campi",
 11        new GetCampiOut()
 12        {
 13            Total = 2,
 14            Items =
 15            [
 16                new GetCampiItemOut
 17                {
 18                    Id = Guid.NewGuid(),
 19                    Name = "Agreste",
 20                    State = BrazilState.PE,
 21                    City = "Caruaru",
 22                    Capacity = 150,
 23                    Students = 120,
 24                    FillRate = 80,
 25                },
 26                new GetCampiItemOut
 27                {
 28                    Id = Guid.NewGuid(),
 29                    Name = "Suassuna",
 30                    State = BrazilState.PE,
 31                    City = "Recife",
 32                    Capacity = 500,
 33                    Students = 234,
 34                    FillRate = 46.80M,
 35                },
 36            ],
 37        }),
 38    ];
 39}
 40
 41public class GetCampiItemOut
 42{
 3043    public Guid Id { get; set; }
 44
 45    /// <summary>
 46    /// Nome
 47    /// </summary>
 3048    public string Name { get; set; }
 49
 3050    public BrazilState State { get; set; }
 51
 52    /// <summary>
 53    /// Cidade
 54    /// </summary>
 3055    public string City { get; set; }
 56
 57    /// <summary>
 58    /// Capacidade total de alunos
 59    /// </summary>
 3260    public int Capacity { get; set; }
 61
 62    /// <summary>
 63    /// Total de alunos
 64    /// </summary>
 2665    public int Students { get; set; }
 66
 67    /// <summary>
 68    /// Total de professores
 69    /// </summary>
 2470    public int Teachers { get; set; }
 71
 72    /// <summary>
 73    /// Taxa de ocupação
 74    /// </summary>
 2675    public decimal FillRate { get; set; }
 76
 77    public string GetFillRate()
 78    {
 079        return $"{FillRate.Format()}%";
 80    }
 81
 82    public override string ToString()
 83    {
 084        return Name;
 85    }
 86}