< Summary - Syki

Information
Class: Syki.Back.Settings.SettingsBase
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Settings/SettingsBase.cs
Tag: 56_26538939494
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 16
Line coverage: 100%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
RequireNonEmpty(...)50%22100%
RequirePositive(...)50%22100%

File(s)

/home/runner/work/syki/syki/Back/Settings/SettingsBase.cs

#LineLine coverage
 1using System.Runtime.CompilerServices;
 2
 3namespace Syki.Back.Settings;
 4
 5public abstract class SettingsBase
 6{
 7    protected void RequireNonEmpty(string value, [CallerArgumentExpression(nameof(value))] string prop = "")
 8    {
 209        if (value.IsEmpty()) throw new InvalidOperationException($"{GetType().Name}.{prop} is required!");
 2010    }
 11
 12    protected void RequirePositive(int value, [CallerArgumentExpression(nameof(value))] string prop = "")
 13    {
 614        if (value <= 0) throw new InvalidOperationException($"{GetType().Name}.{prop} is required!");
 615    }
 16}