< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.Validation.UpdateApplicationCommandValidator
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/Validation/UpdateApplicationCommandValidator.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 23
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/UpdateApplicationCommandValidator.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="UpdateApplicationCommand" /> (UC-18 main flow step 2). The
 8///     messages are UC-16's: the two use cases reject the same shapes, and UC-18 defines no
 9///     alternative flow of its own for invalid input. Application existence, actor authorization, and
 10///     owner eligibility are enforced by the handler.
 11/// </summary>
 12public class UpdateApplicationCommandValidator : AbstractValidator<UpdateApplicationCommand>
 13{
 1714    public UpdateApplicationCommandValidator()
 15    {
 1716        RuleFor(command => command.Name)
 1717            .NotEmpty().WithMessage(ApplicationMessages.NameRequired)
 1718            .MaximumLength(200).WithMessage(ApplicationMessages.NameTooLong);
 19
 1720        RuleFor(command => command.OwnerId)
 1721            .NotEmpty().WithMessage(ApplicationMessages.OwnerRequired);
 1722    }
 23}

Methods/Properties

.ctor()