< Summary - Syki

Information
Class: Syki.Back.Domain.Webhooks.WebhookSubscription
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Domain/Webhooks/WebhookSubscription.cs
Tag: 97_27801654829
Line coverage
0%
Covered lines: 0
Uncovered lines: 22
Coverable lines: 22
Total lines: 37
Line coverage: 0%
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%210%
get_InstitutionId()100%210%
get_Name()100%210%
get_Url()100%210%
get_IsActive()100%210%
get_CreatedAt()100%210%
get_Events()100%210%
get_Calls()100%210%
.ctor()100%210%
.ctor(...)100%210%
Update(...)100%210%

File(s)

/home/runner/work/syki/syki/Back/Domain/Webhooks/WebhookSubscription.cs

#LineLine coverage
 1namespace Syki.Back.Domain.Webhooks;
 2
 3/// <summary>
 4/// Inscrição de Webhook para receber notificações sobre eventos acadêmicos.
 5/// </summary>
 6public class WebhookSubscription
 7{
 08    public int Id { get; set; }
 09    public int InstitutionId { get; set; }
 010    public string Name { get; set; }
 011    public string Url { get; set; }
 012    public bool IsActive { get; set; }
 013    public DateTime CreatedAt { get; set; }
 14
 015    public List<WebhookEventType> Events { get; set; }
 016    public List<WebhookCall> Calls { get; set; }
 17
 018    private WebhookSubscription() { }
 19
 020    public WebhookSubscription(int institutionId, string name, string url, List<WebhookEventType> events)
 21    {
 022        InstitutionId = institutionId;
 023        Name = name;
 024        Url = url;
 025        Events = events;
 026        IsActive = true;
 027        CreatedAt = DateTime.UtcNow;
 028    }
 29
 30    public void Update(string name, string url, List<WebhookEventType> events, bool isActive)
 31    {
 032        Name = name;
 033        Url = url;
 034        Events = events;
 035        IsActive = isActive;
 036    }
 37}