< Summary - Syki

Information
Class: Syki.Back.Domain.Notifications.Notification
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Domain/Notifications/Notification.cs
Tag: 97_27801654829
Line coverage
0%
Covered lines: 0
Uncovered lines: 18
Coverable lines: 18
Total lines: 28
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
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_NotificationType()100%210%
get_Title()100%210%
get_Description()100%210%
get_CreatedAt()100%210%
get_Metadata()100%210%
.ctor()100%210%
.ctor(...)0%620%

File(s)

/home/runner/work/syki/syki/Back/Domain/Notifications/Notification.cs

#LineLine coverage
 1using System.Text.Json;
 2
 3namespace Syki.Back.Domain.Notifications;
 4
 5public class Notification
 6{
 07    public int Id { get; set; }
 08    public NotificationType NotificationType { get; set; }
 09    public string Title { get; set; }
 010    public string Description { get; set; }
 011    public DateTime CreatedAt { get; set; }
 012    public JsonDocument? Metadata { get; set; }
 13
 014    public Notification() { }
 15
 016    public Notification(
 017        NotificationType notificationType,
 018        string title,
 019        string description,
 020        object? metadata = null)
 21    {
 022        NotificationType = notificationType;
 023        Title = title;
 024        Description = description;
 025        CreatedAt = DateTime.UtcNow;
 026        Metadata = metadata != null ? JsonDocument.Parse(metadata.Serialize()) : null;
 027    }
 28}