< Summary - Syki

Information
Class: Syki.Shared.GetCampiOut
Assembly: Shared
File(s): /home/runner/work/syki/syki/Shared/Features/Academic/GetCampi/GetCampiOut.cs
Tag: 21_17346963026
Line coverage
6%
Covered lines: 2
Uncovered lines: 30
Coverable lines: 32
Total lines: 86
Line coverage: 6.2%
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_Total()100%11100%
get_Items()100%11100%
GetExamples()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{
 305    public int Total { get; set; }
 506    public List<GetCampiItemOut> Items { get; set; } = [];
 7
 8    public static IEnumerable<(string, GetCampiOut)> GetExamples() =>
 09    [
 010        ("Campi",
 011        new GetCampiOut()
 012        {
 013            Total = 2,
 014            Items =
 015            [
 016                new GetCampiItemOut
 017                {
 018                    Id = Guid.NewGuid(),
 019                    Name = "Agreste",
 020                    State = BrazilState.PE,
 021                    City = "Caruaru",
 022                    Capacity = 150,
 023                    Students = 120,
 024                    FillRate = 80,
 025                },
 026                new GetCampiItemOut
 027                {
 028                    Id = Guid.NewGuid(),
 029                    Name = "Suassuna",
 030                    State = BrazilState.PE,
 031                    City = "Recife",
 032                    Capacity = 500,
 033                    Students = 234,
 034                    FillRate = 46.80M,
 035                },
 036            ],
 037        }),
 038    ];
 39}
 40
 41public class GetCampiItemOut
 42{
 43    public Guid Id { get; set; }
 44
 45    /// <summary>
 46    /// Nome
 47    /// </summary>
 48    public string Name { get; set; }
 49
 50    public BrazilState State { get; set; }
 51
 52    /// <summary>
 53    /// Cidade
 54    /// </summary>
 55    public string City { get; set; }
 56
 57    /// <summary>
 58    /// Capacidade total de alunos
 59    /// </summary>
 60    public int Capacity { get; set; }
 61
 62    /// <summary>
 63    /// Total de alunos
 64    /// </summary>
 65    public int Students { get; set; }
 66
 67    /// <summary>
 68    /// Total de professores
 69    /// </summary>
 70    public int Teachers { get; set; }
 71
 72    /// <summary>
 73    /// Taxa de ocupação
 74    /// </summary>
 75    public decimal FillRate { get; set; }
 76
 77    public string GetFillRate()
 78    {
 79        return $"{FillRate.Format()}%";
 80    }
 81
 82    public override string ToString()
 83    {
 84        return Name;
 85    }
 86}