< Summary

Information
Class: Syki.Back.Features.Academic.CreateDiscipline.Discipline
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/CreateDiscipline/Discipline.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 22
Uncovered lines: 0
Coverable lines: 22
Total lines: 32
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
get_Id()100%11100%
get_InstitutionId()100%11100%
get_Name()100%11100%
get_Code()100%11100%
get_Links()100%11100%
.ctor(...)50%22100%
ToOut()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Academic/CreateDiscipline/Discipline.cs

#LineLine coverage
 1namespace Syki.Back.Features.Academic.CreateDiscipline;
 2
 3public class Discipline
 4{
 74455    public Guid Id { get; set; }
 38686    public Guid InstitutionId { get; set; }
 77387    public string Name { get; set; }
 74778    public string Code { get; set; }
 92189    public List<CourseDiscipline> Links { get; set; }
 10
 386811    public Discipline(
 386812        Guid institutionId,
 386813        string name
 386814    ) {
 386815        Id = Guid.NewGuid();
 386816        InstitutionId = institutionId;
 386817        Name = name;
 386818        Code = $"{Guid.NewGuid().ToString()[..8].ToUpper()}";
 386819        Links = [];
 386820    }
 21
 22    public DisciplineOut ToOut()
 23    {
 357124        return new()
 357125        {
 357126            Id = Id,
 357127            Name = Name,
 357128            Code = Code,
 177829            Courses = Links.ConvertAll(v => v.CourseId),
 357130        };
 31    }
 32}