< Summary - Estud

Information
Class: Estud.Back.Features.Webhooks.UpdateWebhookSubscription.UpdateWebhookSubscriptionIn
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Webhooks/UpdateWebhookSubscription/UpdateWebhookSubscriptionIn.cs
Tag: 114_29044117136
Line coverage
33%
Covered lines: 6
Uncovered lines: 12
Coverable lines: 18
Total lines: 30
Line coverage: 33.3%
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%
GetExamples()100%210%

File(s)

/home/runner/work/syki/syki/Back/Features/Webhooks/UpdateWebhookSubscription/UpdateWebhookSubscriptionIn.cs

#LineLine coverage
 1namespace Estud.Back.Features.Webhooks.UpdateWebhookSubscription;
 2
 3public class UpdateWebhookSubscriptionIn : IApiDto<UpdateWebhookSubscriptionIn>
 4{
 765    public int Id { get; set; }
 1066    public string Name { get; set; }
 1067    public string Url { get; set; }
 748    public bool IsActive { get; set; }
 909    public List<WebhookEventType> Events { get; set; }
 10
 11    /// <summary>
 12    /// Headers customizados (pares chave-valor) enviados em todas as chamadas feitas para a Url do Webhook.
 13    /// Útil, por exemplo, para autenticação via header.
 14    /// </summary>
 12615    public Dictionary<string, string> CustomHeaders { get; set; } = [];
 16
 17    public static IEnumerable<(string, UpdateWebhookSubscriptionIn)> GetExamples() =>
 018    [
 019        ("Exemplo",
 020        new UpdateWebhookSubscriptionIn
 021        {
 022            Id = 1,
 023            Name = "Aluno criado",
 024            Url = "https://webhook.site/my-webhook",
 025            IsActive = true,
 026            Events = [WebhookEventType.StudentCreated],
 027            CustomHeaders = new() { ["Estud-AuthToken"] = "6r4g654rs6g4we6f4qw684f68qwf4" },
 028        }),
 029    ];
 30}