< Summary

Information
Class: LifeChart.Domain.Entries.MoodScore
Assembly: LifeChart.Domain
File(s): /home/runner/work/lifechart/lifechart/src/LifeChart.Domain/Entries/MoodScore.cs
Tag: 113_29159449707
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 17
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_IsCritical()100%11100%
get_Neutral()100%11100%

File(s)

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

#LineLine coverage
 1namespace LifeChart.Domain.Entries;
 2
 3public record MoodScore
 4{
 395    public int Value { get; }
 6
 767    public MoodScore(int value)
 8    {
 769        if (value < -5 || value > 5)
 510            throw new ArgumentOutOfRangeException(
 511                nameof(value), "Stimmungswert muss zwischen -5 und +5 liegen.");
 7112        Value = value;
 7113    }
 14
 3215    public bool IsCritical => Value <= -4;
 2916    public static MoodScore Neutral => new(0);
 17}