< Summary

Information
Class: Syki.Back.Tasks.SykiTask
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Tasks/SykiTask.cs
Tag: 22_11348620282
Line coverage
89%
Covered lines: 17
Uncovered lines: 2
Coverable lines: 19
Total lines: 53
Line coverage: 89.4%
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_Id()100%11100%
get_Type()100%11100%
get_Data()100%11100%
get_CreatedAt()100%11100%
get_ProcessedAt()100%210%
get_Error()100%210%
get_ProcessorId()100%11100%
.ctor()100%11100%
.ctor(...)100%11100%
SendUserRegisterEmailConfirmation(...)100%11100%
SendResetPasswordEmail(...)100%11100%
SeedInstitutionData(...)100%11100%
LinkOldNotifications(...)100%11100%
CreateNewExamGradeNoteNotification(...)100%11100%

File(s)

/home/runner/work/syki/syki/Back/Tasks/SykiTask.cs

#LineLine coverage
 1using Syki.Back.Features.Teacher.AddExamGradeNote;
 2using Syki.Back.Features.Cross.FinishUserRegister;
 3using Syki.Back.Features.Cross.LinkOldNotifications;
 4using Syki.Back.Features.Cross.SendResetPasswordToken;
 5using Syki.Back.Features.Cross.CreatePendingUserRegister;
 6
 7namespace Syki.Back.Tasks;
 8
 9public class SykiTask
 10{
 292711    public Guid Id { get; set; }
 390212    public string Type { get; set; }
 292713    public string Data { get; set; }
 195414    public DateTime CreatedAt { get; set; }
 015    public DateTime? ProcessedAt { get; set; }
 016    public string? Error { get; set; }
 97317    public Guid? ProcessorId { get; set; }
 18
 195019    public SykiTask() { }
 20
 98121    public SykiTask(object data)
 22    {
 98123        Id = Guid.NewGuid();
 98124        Type = data.GetType().ToString();
 98125        Data = data.Serialize();
 98126        CreatedAt = DateTime.Now;
 98127    }
 28
 29    public static SykiTask SendUserRegisterEmailConfirmation(string email)
 30    {
 29431        return new SykiTask(new SendUserRegisterEmailConfirmation { Email = email });
 32    }
 33
 34    public static SykiTask SendResetPasswordEmail(Guid userId)
 35    {
 19136        return new SykiTask(new SendResetPasswordEmail { UserId = userId });
 37    }
 38
 39    public static SykiTask SeedInstitutionData(Guid institutionId)
 40    {
 27941        return new SykiTask(new SeedInstitutionData { InstitutionId = institutionId });
 42    }
 43
 44    public static SykiTask LinkOldNotifications(Guid userId, Guid institutionId)
 45    {
 17746        return new SykiTask(new LinkOldNotifications { UserId = userId, InstitutionId = institutionId });
 47    }
 48
 49    public static SykiTask CreateNewExamGradeNoteNotification(Guid userId, Guid classId)
 50    {
 4051        return new SykiTask(new CreateNewExamGradeNoteNotification { UserId = userId, ClassId = classId });
 52    }
 53}