< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Output.PurgeExpiredTokensCommandOutput
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Output/PurgeExpiredTokensCommandOutput.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 39
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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_PasswordResetTokensPurged()100%11100%
get_EmailVerificationTokensPurged()100%11100%
get_TwoFactorEmailCodesPurged()100%11100%
get_PendingRegistrationsPurged()100%11100%
get_ApplicationCredentialsPurged()100%11100%
get_AttemptNoticeBudgetsPurged()100%11100%
get_TotalPurged()100%11100%

File(s)

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

#LineLine coverage
 1using ArturRios.Mediator.Command;
 2
 3namespace ArturRios.Heimdall.Command.Output;
 4
 5/// <summary>
 6///     Result of <see cref="Input.PurgeExpiredTokensCommand" />: how many rows the run removed from
 7///     each table. Zero everywhere is an ordinary successful run, not a failure — most runs find
 8///     nothing to do.
 9/// </summary>
 10/// <remarks>
 11///     Deliberately carries no <c>Id</c>: a purge has no single target entity, so the auditing
 12///     decorator records the entry with a null <c>TargetId</c>, which is the honest answer. The
 13///     counts are what make the entry useful.
 14/// </remarks>
 15public class PurgeExpiredTokensCommandOutput : CommandOutput
 16{
 17    /// <summary>Password reset tokens removed (UC-12/UC-13).</summary>
 2618    public int PasswordResetTokensPurged { get; set; }
 19
 20    /// <summary>Email verification tokens removed (UC-14/UC-15).</summary>
 2421    public int EmailVerificationTokensPurged { get; set; }
 22
 23    /// <summary>Two-factor email codes removed (UC-36/UC-38).</summary>
 2424    public int TwoFactorEmailCodesPurged { get; set; }
 25
 26    /// <summary>Unconfirmed pending registrations removed (UC-47).</summary>
 2427    public int PendingRegistrationsPurged { get; set; }
 28
 29    /// <summary>Revoked or expired application credentials removed (UC-55).</summary>
 2430    public int ApplicationCredentialsPurged { get; set; }
 31
 32    /// <summary>Registration-attempt notice budgets whose window had ended removed (FR-SR-14).</summary>
 2433    public int AttemptNoticeBudgetsPurged { get; set; }
 34
 35    /// <summary>Rows removed across all six tables.</summary>
 36    public int TotalPurged =>
 737        PasswordResetTokensPurged + EmailVerificationTokensPurged + TwoFactorEmailCodesPurged +
 738        PendingRegistrationsPurged + ApplicationCredentialsPurged + AttemptNoticeBudgetsPurged;
 39}