< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.SetGoogleSignInCommand
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/SetGoogleSignInCommand.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 34
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 4
Fully covered methods: 4
Total methods: 4
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%11100%
get_Enabled()100%11100%
get_ActingPersonId()100%11100%
get_ActingRole()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/SetGoogleSignInCommand.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using ArturRios.Heimdall.Shared.Security;
 3using ArturRios.Mediator.Command;
 4
 5namespace ArturRios.Heimdall.Command.Input;
 6
 7/// <summary>
 8///     Intent to turn Google Sign-In on or off for a scope (UC-24, FR-GO-01/FR-GO-02). The scope is
 9///     addressed by its <c>PublicId</c> (GUID), assigned from the route.
 10///     <see cref="ActingPersonId" />/<see cref="ActingRole" /> are set by the controller from the
 11///     authenticated caller (for the AF-24b ownership check) and are never bound from the request.
 12///     All three are <c>[JsonIgnore]</c>, so they are not deserialized from the body and do not
 13///     appear in the request schema.
 14/// </summary>
 15public class SetGoogleSignInCommand : BaseCommand, IActorScoped
 16{
 17    /// <summary>Public identifier of the scope whose setting is changing (assigned from the route).</summary>
 18    [JsonIgnore]
 4819    public Guid Id { get; set; }
 20
 21    /// <summary>
 22    ///     The value to write to the scope's <c>GoogleSignInEnabled</c> flag. Nullable on purpose: a
 23    ///     plain <c>bool</c> would bind a body that omits the field to <c>false</c>, so a malformed
 24    ///     request would silently *disable* Google Sign-In. The validator refuses <c>null</c>, which
 25    ///     turns that into an explicit 400 (NFR-10).
 26    /// </summary>
 4327    public bool? Enabled { get; set; }
 28
 29    [JsonIgnore]
 3230    public Guid ActingPersonId { get; set; }
 31
 32    [JsonIgnore]
 3233    public int ActingRole { get; set; }
 34}