< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.Validation.RegisterCommandValidator
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/Validation/RegisterCommandValidator.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 19
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/RegisterCommandValidator.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="RegisterCommand" /> (UC-47, FR-SR-03). A caller learns only that
 8///     their own input is malformed — never whether an address is registered.
 9/// </summary>
 10public class RegisterCommandValidator : AbstractValidator<RegisterCommand>
 11{
 4112    public RegisterCommandValidator()
 13    {
 4114        RuleFor(command => command.Name).PersonName();
 4115        RuleFor(command => command.Email).PersonEmail();
 4116        RuleFor(command => command.Password).PersonPassword();
 4117        RuleFor(command => command.ScopeId).NotNull().WithMessage(AuthMessages.ScopeRequired);
 4118    }
 19}

Methods/Properties

.ctor()