< Summary - Syki

Information
Class: Syki.Shared.GetWebhookCallFullOut
Assembly: Shared
File(s): /home/runner/work/syki/syki/Shared/Features/Academic/GetWebhookCall/GetWebhookCallFullOut.cs
Tag: 4_16869239191
Line coverage
0%
Covered lines: 0
Uncovered lines: 66
Coverable lines: 66
Total lines: 73
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_WebhookId()100%210%
get_WebhookName()100%210%
get_Event()100%210%
get_Status()100%210%
get_Payload()100%210%
get_AttemptsCount()100%210%
get_CreatedAt()100%210%
get_Attempts()100%210%
GetExamples()100%210%

File(s)

/home/runner/work/syki/syki/Shared/Features/Academic/GetWebhookCall/GetWebhookCallFullOut.cs

#LineLine coverage
 1namespace Syki.Shared;
 2
 3public class GetWebhookCallFullOut
 4{
 05    public Guid Id { get; set; }
 06    public Guid WebhookId { get; set; }
 07    public string WebhookName { get; set; }
 08    public WebhookEventType Event { get; set; }
 09    public WebhookCallStatus Status { get; set; }
 010    public string Payload { get; set; }
 011    public int AttemptsCount { get; set; }
 012    public DateTime CreatedAt { get; set; }
 013    public List<GetWebhookCallAttemptOut> Attempts { get; set; } = [];
 14
 15    public static IEnumerable<(string, GetWebhookCallFullOut)> GetExamples() =>
 016    [
 017        (
 018            "Success",
 019            new GetWebhookCallFullOut
 020            {
 021                Id = Guid.CreateVersion7(),
 022                WebhookId = Guid.CreateVersion7(),
 023                WebhookName = "GitHub",
 024                Event = WebhookEventType.StudentCreated,
 025                Status = WebhookCallStatus.Success,
 026                Payload = """{"UserId":"01983c1f-d716-75a9-ac70-12ab881415c4","InstitutionId":"01983c1f-7489-7b95-9d5a-e
 027                AttemptsCount = 1,
 028                CreatedAt = DateTime.UtcNow.AddMinutes(-30),
 029                Attempts =
 030                [
 031                    new()
 032                    {
 033                        Status = WebhookCallAttemptStatus.Success,
 034                        StatusCode = 200,
 035                        Response = "",
 036                        CreatedAt = DateTime.UtcNow.AddMinutes(-29),
 037                    }
 038                ]
 039            }
 040        ),
 041        (
 042            "Error",
 043            new GetWebhookCallFullOut
 044            {
 045                Id = Guid.CreateVersion7(),
 046                WebhookId = Guid.CreateVersion7(),
 047                WebhookName = "GitHub",
 048                Event = WebhookEventType.StudentCreated,
 049                Status = WebhookCallStatus.Error,
 050                Payload = """{"UserId":"01983c1f-d716-75a9-ac70-12ab881415c4","InstitutionId":"01983c1f-7489-7b95-9d5a-e
 051                AttemptsCount = 2,
 052                CreatedAt = DateTime.UtcNow.AddMinutes(-30),
 053                Attempts =
 054                [
 055                    new()
 056                    {
 057                        Status = WebhookCallAttemptStatus.Error,
 058                        StatusCode = 400,
 059                        Response = "User Not Found",
 060                        CreatedAt = DateTime.UtcNow.AddMinutes(-29),
 061                    },
 062                    new()
 063                    {
 064                        Status = WebhookCallAttemptStatus.Error,
 065                        StatusCode = 400,
 066                        Response = "User Not Found",
 067                        CreatedAt = DateTime.UtcNow.AddMinutes(-25),
 068                    }
 069                ]
 070            }
 071        )
 072    ];
 73}