< Summary - Syki

Information
Class: Syki.Back.Features.Campi.GetCampi.GetCampiMapper
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Campi/GetCampi/GetCampiMapper.cs
Tag: 56_26538939494
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 24
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ToGetCampiItemOut(...)50%22100%

File(s)

/home/runner/work/syki/syki/Back/Features/Campi/GetCampi/GetCampiMapper.cs

#LineLine coverage
 1using Syki.Back.Domain.Campi;
 2
 3namespace Syki.Back.Features.Campi.GetCampi;
 4
 5public static class GetCampiMapper
 6{
 7    extension(Campus campus)
 8    {
 9        public GetCampiItemOut ToGetCampiItemOut(int students, int teachers)
 10        {
 411            return new()
 412            {
 413                Id = campus.Id,
 414                Name = campus.Name,
 415                City = campus.City,
 416                State = campus.State,
 417                Capacity = campus.Capacity,
 418                Students = students,
 419                Teachers = teachers,
 420                FillRate = campus.Capacity > 0 ? Math.Round(100M * (1M * students / (1M * campus.Capacity)), 2) : 0,
 421            };
 22        }
 23    }
 24}