< Summary

Information
Class: GistBackend.Types.Gist
Assembly: GistBackend
File(s): /home/runner/work/the-gist-of-it-sec/the-gist-of-it-sec/backend/GistBackend/Types/Gist.cs
Line coverage
100%
Covered lines: 34
Uncovered lines: 0
Coverable lines: 34
Total lines: 49
Line coverage: 100%
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
.ctor(...)100%11100%
get_Reference()100%11100%
get_FeedId()100%11100%
get_Author()100%11100%
get_IsSponsoredContent()100%11100%
get_Published()100%11100%
get_Updated()100%11100%
get_Url()100%11100%
get_Tags()100%11100%
get_Id()100%11100%
.ctor(...)100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/the-gist-of-it-sec/the-gist-of-it-sec/backend/GistBackend/Types/Gist.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace GistBackend.Types;
 4
 5[method: JsonConstructor]
 5056public record Gist(
 5547    string Reference,
 4618    int FeedId,
 4599    string Author,
 46410    bool IsSponsoredContent,
 46711    DateTime Published,
 56412    DateTime Updated,
 66513    Uri Url,
 46214    string Tags,
 50515    int? Id = null
 50516) {
 157617    public int? Id { get; set; } = Id;
 18
 19    public Gist(
 20        RssEntry entry,
 21        SummaryAIResponse summaryAIResponse,
 22        bool isSponsoredContent
 4123    ) : this(
 4124        entry.Reference,
 4125        entry.FeedId,
 4126        entry.Author,
 4127        isSponsoredContent,
 4128        entry.Published,
 4129        entry.Updated,
 4130        entry.Url,
 4131        string.Join(";;", summaryAIResponse.Tags)
 4132    )
 33    {
 4134    }
 35
 36    // Constructor for disabled gists
 137    public Gist(RssEntry entry) : this(
 138        entry.Reference,
 139        entry.FeedId,
 140        entry.Author,
 141        false,
 142        entry.Published,
 143        entry.Updated,
 144        entry.Url,
 145        ""
 146    )
 47    {
 148    }
 49}