< Summary - Syki

Information
Class: Syki.Back.Domain.Identity.SykiUser
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Domain/Identity/SykiUser.cs
Tag: 97_27801654829
Line coverage
87%
Covered lines: 29
Uncovered lines: 4
Coverable lines: 33
Total lines: 50
Line coverage: 87.8%
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{
 1327    public int InstitutionId { get; set; }
 3288    public string Name { get; set; }
 3289    public DateTime CreatedAt { get; set; }
 010    public string? ProfilePhoto { get; set; }
 11
 29212    public Institution? Institution { get; set; }
 13
 214414    public SykiUser() { }
 15
 29216    public SykiUser(
 29217        Institution institution,
 29218        string name,
 29219        string email
 29220    ) {
 29221        Name = name;
 29222        UserName = email;
 29223        Email = email;
 29224        CreatedAt = DateTime.UtcNow;
 29225        Institution = institution;
 29226    }
 27
 3628    public SykiUser(
 3629        int institutionId,
 3630        string name,
 3631        string email
 3632    ) {
 3633        Name = name;
 3634        UserName = email;
 3635        Email = email;
 3636        CreatedAt = DateTime.UtcNow;
 3637        InstitutionId = institutionId;
 3638    }
 39
 40    public void Update(string name, string profilePhoto)
 41    {
 042        Name = name;
 043        ProfilePhoto = profilePhoto;
 044    }
 45
 46    public void ConfirmEmail()
 47    {
 26448        EmailConfirmed = true;
 26449    }
 50}