< Summary - Heimdall API

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%

File(s)

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

#LineLine coverage
 1using ArturRios.Heimdall.Shared.Messages;
 2using FluentValidation;
 3
 4namespace ArturRios.Heimdall.Command.Input.Validation;
 5
 6/// <summary>
 7///     Shape validation for <see cref="VerifyEmailCommand" /> (UC-14). Whether the token exists, has
 8///     expired, or has been used is the handler's business (AF-14a…AF-14c).
 9/// </summary>
 10/// <remarks>
 11///     UC-14 defines no alternative flow for a malformed request — unlike UC-13's AF-13d — but NFR-10
 12///     requires every input to be validated. Nothing is contradicted by the rule: an absent token
 13///     answers 400 here, and would answer 400 as AF-14c if it reached the lookup.
 14/// </remarks>
 15public class VerifyEmailCommandValidator : AbstractValidator<VerifyEmailCommand>
 16{
 11817    public VerifyEmailCommandValidator()
 18    {
 11819        RuleFor(command => command.Token)
 11820            .NotEmpty().WithMessage(AuthMessages.TokenRequired);
 11821    }
 22}

Methods/Properties

.ctor()