< Summary

Information
Class: Syki.Shared.ScheduleIn
Assembly: Shared
File(s): /home/runner/work/syki/syki/Shared/Features/Academic/CreateClass/ScheduleIn.cs
Tag: 22_11348620282
Line coverage
70%
Covered lines: 17
Uncovered lines: 7
Coverable lines: 24
Total lines: 42
Line coverage: 70.8%
Branch coverage
0%
Covered branches: 0
Total branches: 8
Branch coverage: 0%
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_Day()100%11100%
get_Start()100%11100%
get_End()100%11100%
.ctor()100%11100%
.ctor(...)100%11100%
Equals(...)0%7280%
GetHashCode()100%210%

File(s)

/home/runner/work/syki/syki/Shared/Features/Academic/CreateClass/ScheduleIn.cs

#LineLine coverage
 1namespace Syki.Shared;
 2
 3public class ScheduleIn
 4{
 8115    public Guid Id { get; set; }
 8116    public Day Day { get; set; }
 8117    public Hour Start { get; set; }
 8118    public Hour End { get; set; }
 9
 20310    public ScheduleIn()
 11    {
 20312        Id = Guid.NewGuid();
 20313    }
 14
 20215    public ScheduleIn(
 20216        Day dia,
 20217        Hour start,
 20218        Hour end
 20219    ) {
 20220        Id = Guid.NewGuid();
 20221        Day = dia;
 20222        Start = start;
 20223        End = end;
 20224    }
 25
 26    public override bool Equals(object? obj)
 27    {
 028        if (obj == null)
 029            return false;
 030        var other = (ScheduleIn) obj;
 31
 032        if (other.Id == Id)
 033            return true;
 34
 035        return other.Day == Day && other.Start == Start && other.End == End;
 36    }
 37
 38    public override int GetHashCode()
 39    {
 040        return Id.ToHashCode();
 41    }
 42}