< Summary - Estud

Information
Class: Estud.Back.Features.Webhooks.GetWebhookSubscription.GetWebhookSubscriptionOut
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Webhooks/GetWebhookSubscription/GetWebhookSubscriptionOut.cs
Tag: 114_29044117136
Line coverage
35%
Covered lines: 7
Uncovered lines: 13
Coverable lines: 20
Total lines: 27
Line coverage: 35%
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_Name()100%11100%
get_Url()100%11100%
get_IsActive()100%11100%
get_Events()100%11100%
get_CustomHeaders()100%11100%
get_CreatedAt()100%11100%
GetExamples()100%210%

File(s)

/home/runner/work/syki/syki/Back/Features/Webhooks/GetWebhookSubscription/GetWebhookSubscriptionOut.cs

#LineLine coverage
 1namespace Estud.Back.Features.Webhooks.GetWebhookSubscription;
 2
 3public class GetWebhookSubscriptionOut : IApiDto<GetWebhookSubscriptionOut>
 4{
 145    public int Id { get; set; }
 166    public string Name { get; set; }
 167    public string Url { get; set; }
 168    public bool IsActive { get; set; }
 209    public List<WebhookEventType> Events { get; set; }
 2410    public Dictionary<string, string> CustomHeaders { get; set; } = [];
 1211    public DateTime CreatedAt { get; set; }
 12
 13    public static IEnumerable<(string, GetWebhookSubscriptionOut)> GetExamples() =>
 014    [
 015        ("Exemplo",
 016        new GetWebhookSubscriptionOut
 017        {
 018            Id = 1,
 019            Name = "Aluno criado",
 020            Url = "https://webhook.site/my-webhook",
 021            IsActive = true,
 022            Events = [WebhookEventType.StudentCreated],
 023            CustomHeaders = new() { ["Estud-AuthToken"] = "6r4g654rs6g4we6f4qw684f68qwf4" },
 024            CreatedAt = DateTime.UtcNow,
 025        }),
 026    ];
 27}