< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.Validation.CreateScopeOwnerCommandValidator
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/Validation/CreateScopeOwnerCommandValidator.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 26
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/CreateScopeOwnerCommandValidator.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="CreateScopeOwnerCommand" /> (UC-06 path c, AF-06d). Scope
 8///     existence, ownership, and email uniqueness are enforced by the handler.
 9/// </summary>
 10public class CreateScopeOwnerCommandValidator : AbstractValidator<CreateScopeOwnerCommand>
 11{
 512    public CreateScopeOwnerCommandValidator()
 13    {
 514        RuleFor(command => command.Name)
 515            .NotEmpty().WithMessage(PersonMessages.NameRequired)
 516            .MaximumLength(200).WithMessage(PersonMessages.NameTooLong);
 17
 518        RuleFor(command => command.Email)
 519            .NotEmpty().WithMessage(PersonMessages.EmailRequired)
 520            .EmailAddress().WithMessage(PersonMessages.EmailInvalid);
 21
 522        RuleFor(command => command.Password)
 523            .NotEmpty().WithMessage(PersonMessages.PasswordRequired)
 524            .MinimumLength(8).WithMessage(PersonMessages.PasswordTooShort);
 525    }
 26}

Methods/Properties

.ctor()