< Summary

Information
Class: Anichron.API.Settings.PasswordPolicy
Assembly: Anichron.API
File(s): /home/runner/work/anichron/anichron/src/Anichron.API/Settings/PasswordPolicy.cs
Tag: 228_36821334185
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 11
Line coverage: 100%
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_TooShortMessage()100%11100%
get_TooLongMessage()100%11100%

File(s)

/home/runner/work/anichron/anichron/src/Anichron.API/Settings/PasswordPolicy.cs

#LineLine coverage
 1namespace Anichron.API.Settings;
 2
 3public sealed record PasswordPolicy
 4{
 5    public int MinLength { get; init; } = AppDefaults.Password.MinLength;
 6    public int MaxLength { get; init; } = AppDefaults.Password.MaxLength;
 7    public bool CheckPwnedPasswords { get; init; } = AppDefaults.Password.CheckPwned;
 8
 39    internal string TooShortMessage => $"Password must be at least {MinLength} characters.";
 310    internal string TooLongMessage => $"Password must be no longer than {MaxLength} characters.";
 11}