< Summary - Syki

Information
Class: Syki.Back.Features.Academic.GetCampi.GetCampiMapper
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/GetCampi/GetCampiMapper.cs
Tag: 21_17346963026
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/Academic/GetCampi/GetCampiMapper.cs

#LineLine coverage
 1using Syki.Back.Features.Academic.CreateCampus;
 2
 3namespace Syki.Back.Features.Academic.GetCampi;
 4
 5public static class GetCampiMapper
 6{
 7    extension(Campus campus)
 8    {
 9        public GetCampiItemOut ToGetCampiItemOut(int students, int teachers)
 10        {
 811            return new()
 812            {
 813                Id = campus.Id,
 814                Name = campus.Name,
 815                City = campus.City,
 816                State = campus.State,
 817                Capacity = campus.Capacity,
 818                Students = students,
 819                Teachers = teachers,
 820                FillRate = campus.Capacity > 0 ? Math.Round(100M * (1M * students / (1M * campus.Capacity)), 2) : 0,
 821            };
 22        }
 23    }
 24}