< Summary - Syki

Information
Class: Syki.Back.Features.Academic.CreateCourse.Course
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/CreateCourse/Course.cs
Tag: 4_16869239191
Line coverage
96%
Covered lines: 26
Uncovered lines: 1
Coverable lines: 27
Total lines: 44
Line coverage: 96.2%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
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_Type()100%11100%
get_Disciplines()100%11100%
get_Links()100%11100%
get_CourseCurriculums()100%210%
.ctor()100%11100%
.ctor(...)100%11100%
ToOut()100%44100%

File(s)

/home/runner/work/syki/syki/Back/Features/Academic/CreateCourse/Course.cs

#LineLine coverage
 1using Syki.Back.Features.Academic.CreateDiscipline;
 2using Syki.Back.Features.Academic.CreateCourseCurriculum;
 3
 4namespace Syki.Back.Features.Academic.CreateCourse;
 5
 6/// <summary>
 7/// Curso
 8/// </summary>
 9public class Course
 10{
 125011    public Guid Id { get; set; }
 61212    public Guid InstitutionId { get; set; }
 229813    public string Name { get; set; }
 125014    public CourseType Type { get; set; }
 550215    public List<Discipline> Disciplines { get; set; }
 61216    public List<CourseDiscipline> Links { get; set; }
 017    public List<CourseCurriculum> CourseCurriculums { get; set; }
 18
 213219    private Course() {}
 20
 61221    public Course(
 61222        Guid institutionId,
 61223        string name,
 61224        CourseType type
 61225    ) {
 61226        Id = Guid.CreateVersion7();
 61227        InstitutionId = institutionId;
 61228        Name = name;
 61229        Type = type;
 61230        Links = [];
 61231        Disciplines = [];
 61232    }
 33
 34    public CourseOut ToOut()
 35    {
 63636        return new CourseOut
 63637        {
 63638            Id = Id,
 63639            Name = Name,
 63640            Type = Type,
 425441            Disciplines = Disciplines?.ConvertAll(x => x.ToOut()) ?? [],
 63642        };
 43    }
 44}