< Summary

Information
Class: Syki.Back.Features.Teacher.CreateLessonAttendance.LessonAttendance
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Teacher/CreateLessonAttendance/LessonAttendance.cs
Tag: 22_11348620282
Line coverage
61%
Covered lines: 16
Uncovered lines: 10
Coverable lines: 26
Total lines: 39
Line coverage: 61.5%
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%210%
get_ClassId()100%11100%
get_LessonId()100%11100%
get_StudentId()100%11100%
get_Present()100%11100%
.ctor(...)100%11100%
Update(...)100%210%
ToOut(...)100%210%

File(s)

/home/runner/work/syki/syki/Back/Features/Teacher/CreateLessonAttendance/LessonAttendance.cs

#LineLine coverage
 1namespace Syki.Back.Features.Teacher.CreateLessonAttendance;
 2
 3public class LessonAttendance
 4{
 05    public Guid Id { get; }
 2646    public Guid ClassId { get; set; }
 1057    public Guid LessonId { get; set; }
 1268    public Guid StudentId { get; set; }
 1399    public bool Present { get; set; }
 10
 10511    public LessonAttendance(
 10512        Guid classId,
 10513        Guid lessonId,
 10514        Guid studentId,
 10515        bool present
 10516    ) {
 10517        Id = Guid.NewGuid();
 10518        ClassId = classId;
 10519        LessonId = lessonId;
 10520        StudentId = studentId;
 10521        Present = present;
 10522    }
 23
 24    public void Update(bool present)
 25    {
 026        Present = present;
 027    }
 28
 29    public GetTeacherLessonAttendanceOut ToOut(string studentName)
 30    {
 031        return new()
 032        {
 033            LessonId = LessonId,
 034            StudentId = StudentId,
 035            StudentName = studentName,
 036            Present = Present,
 037        };
 38    }
 39}