< Summary - Syki

Information
Class: Syki.Front.Features.Student.GetStudentClass.StudentClassOutMapper
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Features/Student/GetStudentClass/StudentClassOutMapper.cs
Tag: 4_16869239191
Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
Total lines: 34
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 16
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
GetAverageIcon(...)0%2040%
GetAverageColor(...)0%2040%
GetFrequencyIcon(...)0%2040%
GetFrequencyColor(...)0%2040%

File(s)

/home/runner/work/syki/syki/Front/Features/Student/GetStudentClass/StudentClassOutMapper.cs

#LineLine coverage
 1using MudBlazor;
 2
 3namespace Syki.Front.Features.Student.GetStudentClass;
 4
 5public static class StudentClassOutMapper
 6{
 7    public static string GetAverageIcon(this StudentClassOut @class)
 8    {
 09        if (@class.Average < 3) return Icons.Material.Filled.ErrorOutline;
 010        if (@class.Average < 7) return Icons.Material.Rounded.WarningAmber;
 011        return Icons.Material.Filled.CheckCircleOutline;
 12    }
 13
 14    public static Color GetAverageColor(this StudentClassOut @class)
 15    {
 016        if (@class.Average < 3) return Color.Error;
 017        if (@class.Average < 7) return Color.Warning;
 018        return Color.Success;
 19    }
 20
 21    public static string GetFrequencyIcon(this StudentClassOut @class)
 22    {
 023        if (@class.Frequency < 30) return Icons.Material.Filled.ErrorOutline;
 024        if (@class.Frequency < 70) return Icons.Material.Rounded.WarningAmber;
 025        return Icons.Material.Filled.CheckCircleOutline;
 26    }
 27
 28    public static Color GetFrequencyColor(this StudentClassOut @class)
 29    {
 030        if (@class.Frequency < 30) return Color.Error;
 031        if (@class.Frequency < 70) return Color.Warning;
 032        return Color.Success;
 33    }
 34}