< Summary

Information
Class: Syki.Back.Features.Cross.CreateInstitution.Institution
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Cross/CreateInstitution/Institution.cs
Tag: 22_11348620282
Line coverage
67%
Covered lines: 19
Uncovered lines: 9
Coverable lines: 28
Total lines: 50
Line coverage: 67.8%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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_Name()100%11100%
get_CreatedAt()100%11100%
get_Campi()100%210%
get_Courses()100%210%
get_Students()100%210%
get_Configs()100%11100%
get_Teachers()100%210%
get_Disciplines()100%210%
get_Notifications()100%210%
get_CourseOfferings()100%210%
get_AcademicPeriods()100%210%
get_CourseCurriculums()100%210%
.ctor()100%11100%
.ctor(...)100%11100%
ToOut()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Cross/CreateInstitution/Institution.cs

#LineLine coverage
 1using Syki.Back.Features.Academic.CreateCourse;
 2using Syki.Back.Features.Academic.CreateCampus;
 3using Syki.Back.Features.Academic.CreateTeacher;
 4using Syki.Back.Features.Academic.CreateStudent;
 5using Syki.Back.Features.Academic.CreateDiscipline;
 6using Syki.Back.Features.Academic.CreateNotification;
 7using Syki.Back.Features.Academic.CreateCourseOffering;
 8using Syki.Back.Features.Academic.CreateAcademicPeriod;
 9using Syki.Back.Features.Academic.CreateCourseCurriculum;
 10
 11namespace Syki.Back.Features.Cross.CreateInstitution;
 12
 13public class Institution
 14{
 135815    public Guid Id { get; set; }
 51416    public string Name { get; set; }
 51017    public DateTime CreatedAt { get; set; }
 018    public List<Campus> Campi { get; set; }
 019    public List<Course> Courses { get; set; }
 020    public List<SykiStudent> Students { get; set; }
 74321    public InstitutionConfigs Configs { get; set; }
 022    public List<SykiTeacher> Teachers { get; set; }
 023    public List<Discipline> Disciplines { get; set; }
 024    public List<Notification> Notifications { get; set; }
 025    public List<CourseOffering> CourseOfferings { get; set; }
 026    public List<AcademicPeriod> AcademicPeriods { get; set; }
 027    public List<CourseCurriculum> CourseCurriculums { get; set; }
 28
 45829    public Institution() { }
 30
 28231    public Institution(string name)
 32    {
 28233        Id = Guid.NewGuid();
 28234        Name = name;
 28235        CreatedAt = DateTime.Now;
 28236        Configs = new InstitutionConfigs(Id, 7, 70);
 28237    }
 38
 39    public InstitutionOut ToOut()
 40    {
 22841        return new()
 22842        {
 22843            Id = Id,
 22844            Name = Name,
 22845            CreatedAt = CreatedAt,
 22846            NoteLimit = Configs.NoteLimit,
 22847            FrequencyLimit = Configs.FrequencyLimit,
 22848        };
 49    }
 50}