< Summary - Syki

Information
Class: Syki.Back.Domain.Identity.SykiUser
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Domain/Identity/SykiUser.cs
Tag: 56_26538939494
Line coverage
87%
Covered lines: 28
Uncovered lines: 4
Coverable lines: 32
Total lines: 49
Line coverage: 87.5%
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_InstitutionId()100%11100%
get_Name()100%11100%
get_CreatedAt()100%11100%
get_ProfilePhoto()100%210%
get_Institution()100%11100%
.ctor()100%11100%
.ctor(...)100%11100%
.ctor(...)100%11100%
Update(...)100%210%
ConfirmEmail()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Domain/Identity/SykiUser.cs

#LineLine coverage
 1using Syki.Back.Domain.Institutions;
 2
 3namespace Syki.Back.Domain.Identity;
 4
 5public class SykiUser : IdentityUser<int>
 6{
 1207    public int InstitutionId { get; set; }
 2988    public string Name { get; set; }
 2989    public DateTime CreatedAt { get; set; }
 010    public string? ProfilePhoto { get; set; }
 11
 26812    public Institution? Institution { get; set; }
 13
 196414    public SykiUser() { }
 15
 26816    public SykiUser(
 26817        Institution institution,
 26818        string email
 26819    ) {
 26820        Name = email;
 26821        UserName = email;
 26822        Email = email;
 26823        CreatedAt = DateTime.UtcNow;
 26824        Institution = institution;
 26825    }
 26
 3027    public SykiUser(
 3028        int institutionId,
 3029        string name,
 3030        string email
 3031    ) {
 3032        Name = name;
 3033        UserName = email;
 3034        Email = email;
 3035        CreatedAt = DateTime.UtcNow;
 3036        InstitutionId = institutionId;
 3037    }
 38
 39    public void Update(string name, string profilePhoto)
 40    {
 041        Name = name;
 042        ProfilePhoto = profilePhoto;
 043    }
 44
 45    public void ConfirmEmail()
 46    {
 23447        EmailConfirmed = true;
 23448    }
 49}