< Summary

Information
Class: TestUtilities.SyndicationFeedExtensions
Assembly: GistBackend.TestUtilities
File(s): /home/runner/work/the-gist-of-it-sec/the-gist-of-it-sec/backend/GistBackend.TestUtilities/SyndicationFeedExtensions.cs
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
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
ToEncodedXmlString(...)100%11100%

File(s)

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

#LineLine coverage
 1using System.ServiceModel.Syndication;
 2using System.Text;
 3using System.Xml;
 4
 5namespace TestUtilities;
 6
 7public static class SyndicationFeedExtensions
 8{
 9    public static string ToEncodedXmlString(this SyndicationFeed feed)
 10    {
 3011        var formatter = new Atom10FeedFormatter(feed);
 3012        var output = new StringWriter();
 3013        var settings = new XmlWriterSettings
 3014        {
 3015            Indent = true,
 3016            Encoding = Encoding.UTF8
 3017        };
 3018        using var xmlWriter = XmlWriter.Create(output, settings);
 3019        formatter.WriteTo(xmlWriter);
 3020        xmlWriter.Flush();
 3021        return output.ToString();
 3022    }
 23}