< Summary

Information
Class: TestUtilities.TestFeed
Assembly: GistBackend.TestUtilities
File(s): /home/runner/work/the-gist-of-it-sec/the-gist-of-it-sec/backend/GistBackend.TestUtilities/TestFeed.cs
Line coverage
100%
Covered lines: 14
Uncovered lines: 0
Coverable lines: 14
Total lines: 23
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_RssUrl()100%11100%
get_Language()100%11100%
get_Type()100%11100%
get_AllowedCategories()100%11100%
get_ForbiddenCategories()100%11100%
ExtractText(...)100%11100%
CheckForSponsoredContent(...)100%11100%
CheckForPaywall(...)100%11100%

File(s)

/home/runner/work/the-gist-of-it-sec/the-gist-of-it-sec/backend/GistBackend.TestUtilities/TestFeed.cs

#LineLine coverage
 1using GistBackend.Types;
 2
 3namespace TestUtilities;
 4
 375public record TestFeed(
 376    Uri RssUrl,
 377    Language Language,
 378    FeedType Type,
 379    IEnumerable<string>? AllowedCategories = null,
 3710    IEnumerable<string>? ForbiddenCategories = null)
 11    : RssFeed
 12{
 13    public const string SponsoredContentMarker = "SPONSORED CONTENT";
 14    public const string PaywallContentMarker = "PAYWALL CONTENT";
 18915    public override Uri RssUrl { get; } = RssUrl;
 22616    public override Language Language { get; } = Language;
 9217    public override FeedType Type { get; } = Type;
 7118    public override IEnumerable<string>? AllowedCategories { get; } = AllowedCategories;
 7119    public override IEnumerable<string>? ForbiddenCategories { get; } = ForbiddenCategories;
 3020    public override string ExtractText(string content) => content;
 3021    public override bool CheckForSponsoredContent(string content) => content.Contains(SponsoredContentMarker);
 7222    public override bool CheckForPaywall(string content) => content.Contains(PaywallContentMarker);
 23};