< Summary - Syki

Information
Class: Syki.Front.Components.Passwords.SetupPassword
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Components/Passwords/SetupPassword.cs
Tag: 4_16869239191
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 26
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_Password()100%11100%
get_Validation()100%11100%
.ctor()100%11100%
Validate()100%11100%
IsValid()100%11100%

File(s)

/home/runner/work/syki/syki/Front/Components/Passwords/SetupPassword.cs

#LineLine coverage
 1namespace Syki.Front.Components.Passwords;
 2
 3public class SetupPassword
 4{
 1565    public string Password { get; set; }
 1826    public SetupPasswordValidation Validation { get; set; } = new();
 7
 268    private readonly string _numbers = "0123456789";
 269    private readonly string _lowers = "abcdefghijklmnopqrstuvwxyz";
 2610    private readonly string _uppers = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 2611    private readonly string _nonAlphanumeric = "()~!@#$%^&*-+=|{}[]:;<>,.?/_";
 12
 13    public void Validate()
 14    {
 2615        Validation.HasNumbers = Password.IndexOfAny(_numbers.ToCharArray()) >= 0;
 2616        Validation.HasLower = Password.IndexOfAny(_lowers.ToCharArray()) >= 0;
 2617        Validation.HasUpper = Password.IndexOfAny(_uppers.ToCharArray()) >= 0;
 2618        Validation.HasLength = Password.Length >= 8;
 2619        Validation.HasNonAlphanumeric = Password.IndexOfAny(_nonAlphanumeric.ToCharArray()) >= 0;
 2620    }
 21
 22    public bool IsValid()
 23    {
 1624        return Validation.IsValid();
 25    }
 26}