< Summary - Syki

Information
Class: Syki.Back.Extensions.ListExtensions
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Extensions/ListExtensions.cs
Tag: 56_26538939494
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 14
Line coverage: 0%
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
GetAverageNote(...)0%620%

File(s)

/home/runner/work/syki/syki/Back/Extensions/ListExtensions.cs

#LineLine coverage
 1namespace Syki.Back.Extensions;
 2
 3public static class ListExtensions
 4{
 5    extension(List<decimal> notes)
 6    {
 7        public decimal GetAverageNote()
 8        {
 09            if (notes.Count <= 2) return 0;
 010            var average = notes.Select(x => x).OrderDescending().Take(2).Average();
 011            return Math.Round(average, 2);
 12        }
 13    }
 14}