< Summary

Information
Class: Syki.Shared.GetStudentFrequenciesOut
Assembly: Shared
File(s): /home/runner/work/syki/syki/Shared/Features/Student/GetStudentFrequencies/GetStudentFrequenciesOut.cs
Tag: 22_11348620282
Line coverage
81%
Covered lines: 13
Uncovered lines: 3
Coverable lines: 16
Total lines: 32
Line coverage: 81.2%
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_Name()100%11100%
get_Period()100%11100%
get_Status()100%11100%
get_Lessons()100%11100%
get_Presences()100%11100%
.ctor()100%11100%
.ctor(...)100%11100%
GetFormated()100%210%
GetPercentage()0%620%

File(s)

/home/runner/work/syki/syki/Shared/Features/Student/GetStudentFrequencies/GetStudentFrequenciesOut.cs

#LineLine coverage
 1namespace Syki.Shared;
 2
 3public class GetStudentFrequenciesOut
 4{
 495    public string Name { get; set; }
 496    public string Period { get; set; }
 427    public StudentDisciplineStatus Status { get; set; }
 428    public int Lessons { get; set; }
 429    public int Presences { get; set; }
 10
 1411    public GetStudentFrequenciesOut() {}
 12
 1413    public GetStudentFrequenciesOut(string name, string period, int lessons, int presences, StudentDisciplineStatus stat
 14    {
 1415        Name = name;
 1416        Period = period;
 1417        Lessons = lessons;
 1418        Presences = presences;
 1419        Status = status;
 1420    }
 21
 22    public string GetFormated()
 23    {
 024        return $"{Presences.Format()} / {Lessons.Format()}";
 25    }
 26
 27    public decimal GetPercentage()
 28    {
 029        if (Lessons == 0) return 0.00M;
 030        return 100M*(1M * Presences / (1M * Lessons));
 31    }
 32}