< Summary - SonghayCore

Information
Class: Songhay.Models.OpmlHead
Assembly: SonghayCore
File(s): /home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/OpmlHead.cs
Line coverage
95%
Covered lines: 20
Uncovered lines: 1
Coverable lines: 21
Total lines: 88
Line coverage: 95.2%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%1100%
get_Title()100%1100%
get_DateCreated()100%10%
set_DateCreated(...)50%2100%
get_DateCreatedString()100%1100%
get_DateModified()100%1100%
set_DateModified(...)50%2100%
get_DateModifiedString()100%1100%
get_OwnerName()100%1100%
get_OwnerEmail()100%1100%

File(s)

/home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/OpmlHead.cs

#LineLine coverage
 1namespace Songhay.Models;
 2
 3/// <summary>
 4/// Defines a managed representation of the OPML head element.
 5/// </summary>
 6[Serializable]
 7[XmlRoot(ElementName = "head")]
 8[DataContract(Name = "head")]
 9public class OpmlHead
 10{
 11    /// <summary>
 12    /// Initializes a new instance of the <see cref="OpmlHead"/> class.
 13    /// </summary>
 514    public OpmlHead()
 515    {
 516        DateCreated = DateTime.Now;
 517        DateModified = DateTime.Now;
 518    }
 19
 20    /// <summary>
 21    /// Gets or sets the title.
 22    /// </summary>
 23    [XmlElement(ElementName = "title")]
 24    [JsonPropertyName("title")]
 725    public string? Title { get; set; }
 26
 27    /// <summary>
 28    /// Gets or sets the date created.
 29    /// </summary>
 30    [XmlIgnore]
 31    [JsonIgnore]
 32    public DateTime? DateCreated
 33    {
 034        get => _dateCreated;
 35        set
 1036        {
 1037            _dateCreated = value;
 1038            DateCreatedString = value.HasValue ? ProgramTypeUtility.ConvertDateTimeToRfc822DateTime(value.Value) : null;
 1039        }
 40    }
 41
 42    /// <summary>
 43    /// Gets the date created string.
 44    /// </summary>
 45    [XmlElement(ElementName = "dateCreated")]
 46    [JsonPropertyName("dateCreated")]
 1147    public string? DateCreatedString { get; set; }
 48
 49    /// <summary>
 50    /// Gets or sets the date modified.
 51    /// </summary>
 52    [XmlIgnore]
 53    [JsonIgnore]
 54    public DateTime? DateModified
 55    {
 156        get => _dateModified;
 57        set
 1158        {
 1159            _dateModified = value;
 1160            DateModifiedString =
 1161                value.HasValue ? ProgramTypeUtility.ConvertDateTimeToRfc822DateTime(value.Value) : null;
 1162        }
 63    }
 64
 65    /// <summary>
 66    /// Gets the date created string.
 67    /// </summary>
 68    [XmlElement(ElementName = "dateModified")]
 69    [JsonPropertyName("dateModified")]
 1270    public string? DateModifiedString { get; set; }
 71
 72    /// <summary>
 73    /// Gets or sets the name of the owner.
 74    /// </summary>
 75    [XmlElement(ElementName = "ownerName")]
 76    [JsonPropertyName("ownerName")]
 677    public string? OwnerName { get; set; }
 78
 79    /// <summary>
 80    /// Gets or sets the owner email.
 81    /// </summary>
 82    [XmlElement(ElementName = "ownerEmail")]
 83    [JsonPropertyName("ownerEmail")]
 684    public string? OwnerEmail { get; set; }
 85
 86    DateTime? _dateCreated;
 87    DateTime? _dateModified;
 88}