< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Output.RequestErasureCommandOutput
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Output/RequestErasureCommandOutput.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 50
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage
100%
Covered methods: 7
Fully covered methods: 7
Total methods: 7
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%11100%
get_RequestedAt()100%11100%
get_DueAt()100%11100%
get_Blocked()100%11100%
get_BlockedReason()100%11100%
get_RestrictionLifted()100%11100%
AuditedSideEffects()100%22100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Output/RequestErasureCommandOutput.cs

#LineLine coverage
 1using ArturRios.Heimdall.Command.Auditing;
 2using ArturRios.Heimdall.Command.Input;
 3using ArturRios.Mediator.Command;
 4
 5namespace ArturRios.Heimdall.Command.Output;
 6
 7/// <summary>
 8///     Result of <see cref="Input.RequestErasureCommand" /> (UC-42): what the subject is owed and
 9///     by when.
 10/// </summary>
 11public class RequestErasureCommandOutput : CommandOutput, IAuditedSideEffects
 12{
 13    /// <summary>Public identifier of the identity the erasure was requested for.</summary>
 4214    public Guid Id { get; set; }
 15
 16    /// <summary>When the request was recorded.</summary>
 3317    public DateTime RequestedAt { get; set; }
 18
 19    /// <summary>
 20    ///     The deadline the erasure must not outlive. Returned to the subject because GDPR Art.
 21    ///     12(3) is an obligation owed to them, and one they cannot hold anyone to without knowing
 22    ///     it.
 23    /// </summary>
 3324    public DateTime DueAt { get; set; }
 25
 26    /// <summary>
 27    ///     Whether something prevents the erasure from proceeding yet. The request is recorded and
 28    ///     the deadline runs either way.
 29    /// </summary>
 4030    public bool Blocked { get; set; }
 31
 32    /// <summary>Why it is blocked, when it is; <c>null</c> otherwise.</summary>
 3333    public string? BlockedReason { get; set; }
 34
 35    /// <summary>
 36    ///     Whether the request lifted a restriction on processing the subject had in place (UC-44).
 37    ///     An erasure request is the subject's own instruction to stop holding the record, so it
 38    ///     ends the restriction that would otherwise keep the record from being erased (NFR-24) —
 39    ///     without the Art. 18(3) notice, since the subject is the one lifting it (UC-45).
 40    /// </summary>
 5241    public bool RestrictionLifted { get; set; }
 42
 43    /// <summary>
 44    ///     A lifted restriction is recorded in the audit trail as a lift of its own, so a reader
 45    ///     looking for when the restriction ended finds it under the same name whichever way it was
 46    ///     lifted.
 47    /// </summary>
 48    public IEnumerable<string> AuditedSideEffects() =>
 1149        RestrictionLifted ? [nameof(LiftProcessingRestrictionCommand)] : [];
 50}