< Summary

Information
Class: LifeChart.Domain.Entries.SleepHours
Assembly: LifeChart.Domain
File(s): /home/runner/work/lifechart/lifechart/src/LifeChart.Domain/Entries/SleepHours.cs
Tag: 113_29159449707
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 16
Line coverage: 100%
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_Value()100%11100%
.ctor(...)100%44100%
get_Zero()100%11100%

File(s)

/home/runner/work/lifechart/lifechart/src/LifeChart.Domain/Entries/SleepHours.cs

#LineLine coverage
 1namespace LifeChart.Domain.Entries;
 2
 3public record SleepHours
 4{
 55    public int Value { get; }
 6
 627    public SleepHours(int value)
 8    {
 629        if (value < 0 || value > 24)
 210            throw new ArgumentOutOfRangeException(
 211                nameof(value), "Schlafdauer muss zwischen 0 und 24 Stunden liegen.");
 6012        Value = value;
 6013    }
 14
 2915    public static SleepHours Zero => new(0);
 16}