Refactors the test fixtures and their consumers to compose other fixtures instead of instantiating models inline

This commit is contained in:
BinaryAlley committed 2026-10-02 14:37:23 +03:00
1 parent 0abda472c6
commit 3aadd6de84
157 files changed
+1312 -597

No files matched your search

@@ -133,7 +133,7 @@ public class GetReadingResourceEndpointTests
Guid libraryId = Guid.NewGuid();
Guid bookId = Guid.NewGuid();
CancellationToken cancellationToken = CancellationToken.None;
ReadingResourceDataDto response = new(Guid.NewGuid().ToByteArray(), mimeType);
ReadingResourceDataDto response = _readingResourceDataDtoFixture.Create(data: Guid.NewGuid().ToByteArray(), mimeType: mimeType);
_mockHandler.HandleAsync(Arg.Any<GetReadingResourceQuery>(), Arg.Any<CancellationToken>())
.Returns(Result.From(response));
_sut.HttpContext.Request.RouteValues["libraryId"] = libraryId.ToString();