< Summary - Estud

Information
Class: Estud.Back.Features.Webhooks.GetWebhookSubscriptions.GetWebhookSubscriptionsOut
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Webhooks/GetWebhookSubscriptions/GetWebhookSubscriptionsOut.cs
Tag: 114_29044117136
Line coverage
9%
Covered lines: 2
Uncovered lines: 20
Coverable lines: 22
Total lines: 40
Line coverage: 9%
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_Total()100%11100%
get_Items()100%11100%
GetExamples()100%210%

File(s)

/home/runner/work/syki/syki/Back/Features/Webhooks/GetWebhookSubscriptions/GetWebhookSubscriptionsOut.cs

#LineLine coverage
 1namespace Estud.Back.Features.Webhooks.GetWebhookSubscriptions;
 2
 3public class GetWebhookSubscriptionsOut : IApiDto<GetWebhookSubscriptionsOut>
 4{
 165    public int Total { get; set; }
 286    public List<GetWebhookSubscriptionsItemOut> Items { get; set; } = [];
 7
 8    public static IEnumerable<(string, GetWebhookSubscriptionsOut)> GetExamples() =>
 09    [
 010        ("Exemplo",
 011        new GetWebhookSubscriptionsOut
 012        {
 013            Total = 1,
 014            Items =
 015            [
 016                new GetWebhookSubscriptionsItemOut
 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            ],
 027        }),
 028    ];
 29}
 30
 31public class GetWebhookSubscriptionsItemOut
 32{
 33    public int Id { get; set; }
 34    public string Name { get; set; }
 35    public string Url { get; set; }
 36    public bool IsActive { get; set; }
 37    public List<WebhookEventType> Events { get; set; }
 38    public Dictionary<string, string> CustomHeaders { get; set; } = [];
 39    public DateTime CreatedAt { get; set; }
 40}