< Summary

Information
Class: Dotnet.Installer.Core.Types.SnapPublisher
Assembly: Dotnet.Installer.Core
File(s): /home/runner/work/dotnet-snap/dotnet-snap/src/Dotnet.Installer.Core/Types/SnapPublisher.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 26
Line coverage: 0%
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%210%
get_Id()100%210%
get_Username()100%210%
get_DisplayName()100%210%
get_Validation()100%210%
get_IsVerified()100%210%

File(s)

/home/runner/work/dotnet-snap/dotnet-snap/src/Dotnet.Installer.Core/Types/SnapPublisher.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Dotnet.Installer.Core.Types;
 4
 5/// <summary>
 6/// Information about the publisher of a snap
 7/// </summary>
 8/// <param name="Id">The snap store account identifier of the publisher</param>
 9/// <param name="Username">The snap store account name of the publisher</param>
 10/// <param name="DisplayName">The display name of the publisher in the snap store</param>
 11/// <param name="Validation">
 12/// The validation status of the publisher in the snap store. (e.g., <c>"verified"</c>, <c>"unproven"</c>)
 13/// </param>
 14/// <seealso href="https://snapcraft.io/docs/snapd-api#heading--find"/>
 015public record SnapPublisher(
 016    string Id,
 017    string Username,
 018    string DisplayName,
 019    string Validation)
 20{
 21    /// <summary>
 22    /// <see langword="true"/> if <see cref="Validation"/> is <c>"verified"</c>; otherwise <see langword="false"/>
 23    /// </summary>
 24    [JsonIgnore]
 025    public bool IsVerified => Validation.Equals("verified");
 26}