Fix CA1873 warning and consolidate test fixtures (#313)

This commit is contained in:
Aaron Po
2026-09-12 22:14:55 -04:00
committed by GitHub
parent 40ae75808c
commit a6a9046457
6 changed files with 150 additions and 121 deletions

View File

@@ -5,14 +5,15 @@ using MediatR;
namespace Shared.Application.Behaviors;
/// <summary>
/// MediatR pipeline behavior that runs registered FluentValidation validators before the handler,
/// MediatR pipeline behavior that runs registered FluentValidation validators
/// before the handler,
/// throwing <see cref="ValidationException" /> if any report failures.
/// </summary>
public class ValidationBehavior<TRequest, TResponse>(IEnumerable<IValidator<TRequest>> validators)
: IPipelineBehavior<TRequest, TResponse>
where TRequest : IRequest<TResponse>
{
/// <inheritdoc/>
/// <inheritdoc />
public async Task<TResponse> Handle(
TRequest request,
RequestHandlerDelegate<TResponse> next,