Adds authentication support for integration testing

This commit is contained in:
BinaryAlley committed 2024-11-16 15:49:24 +02:00
1 parent f2703b86c5
commit 5aa7a5f672
33 files changed
+671 -227

No files matched your search

@@ -1,4 +1,5 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.FileSystemManagement.Paths.Queries.CheckPathExists;
@@ -84,12 +85,12 @@ public class CheckPathExistsEndpointTests
TaskCompletionSource<bool> cancellationRequested = new();
_mockSender.Send(Arg.Any<CheckPathExistsQuery>(), Arg.Any<CancellationToken>())
.Returns(callInfo => new ValueTask<PathExistsResponse>(Task.Run(async () =>
.Returns(callInfo => new ValueTask<ErrorOr<PathExistsResponse>>(Task.Run(async () =>
{
operationStarted.SetResult(true);
await cancellationRequested.Task;
callInfo.Arg<CancellationToken>().ThrowIfCancellationRequested();
return new PathExistsResponse(true);
return ErrorOrFactory.From(new PathExistsResponse(true));
}, callInfo.Arg<CancellationToken>())));
// Act