< Summary - Estud

Information
Class: Estud.Back.Domain.Notifications.Notification
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Domain/Notifications/Notification.cs
Tag: 114_29044117136
Line coverage
95%
Covered lines: 20
Uncovered lines: 1
Coverable lines: 21
Total lines: 31
Line coverage: 95.2%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
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_InstitutionId()100%11100%
get_NotificationType()100%11100%
get_Title()100%11100%
get_Description()100%11100%
get_CreatedAt()100%11100%
get_Metadata()100%11100%
.ctor()100%210%
.ctor(...)50%22100%

File(s)

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

#LineLine coverage
 1using System.Text.Json;
 2
 3namespace Estud.Back.Domain.Notifications;
 4
 5public class Notification
 6{
 187    public int Id { get; set; }
 188    public int InstitutionId { get; set; }
 189    public NotificationType NotificationType { get; set; }
 1810    public string Title { get; set; }
 1811    public string Description { get; set; }
 1812    public DateTime CreatedAt { get; set; }
 1813    public JsonDocument? Metadata { get; set; }
 14
 015    public Notification() { }
 16
 1817    public Notification(
 1818        int institutionId,
 1819        NotificationType notificationType,
 1820        string title,
 1821        string description,
 1822        object? metadata = null)
 23    {
 1824        InstitutionId = institutionId;
 1825        NotificationType = notificationType;
 1826        Title = title;
 1827        Description = description;
 1828        CreatedAt = DateTime.UtcNow;
 1829        Metadata = metadata != null ? JsonDocument.Parse(metadata.Serialize()) : null;
 1830    }
 31}