Standardizes test conventions and documentation

This commit is contained in:
BinaryAlley committed 2026-08-24 14:20:08 -07:00
1 parent 7aeed04255
commit f42dc709de
190 files changed
+2180 -2814

No files matched your search

@@ -15,6 +15,8 @@ namespace Lumina.Contracts.Fixtures.Core.Responses.FileSystemManagement.Thumbnai
[ExcludeFromCodeCoverage]
public class ThumbnailResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="ThumbnailResponse"/>.
/// </summary>
@@ -23,10 +25,9 @@ public class ThumbnailResponseFixture
/// <returns>The created <see cref="ThumbnailResponse"/>.</returns>
public ThumbnailResponse Create(ImageType? type = null, byte[]? bytes = null)
{
Faker faker = new();
return new ThumbnailResponse(
type ?? faker.PickRandom<ImageType>(),
bytes ?? faker.Random.Bytes(20)
type ?? _faker.PickRandom<ImageType>(),
bytes ?? _faker.Random.Bytes(20)
);
}
@@ -40,7 +40,8 @@ public class BookResponseFixture
WrittenContentMetadataDto? metadata = null,
BookFormat? format = null,
MetadataStatus? metadataStatus = null,
DateTime? createdOnUtc = null)
DateTime? createdOnUtc = null,
string? coverPath = null)
{
DateTime resolvedCreatedOnUtc = createdOnUtc ?? _faker.Date.Past().ToUniversalTime();
return new BookResponse(
@@ -70,7 +71,8 @@ public class BookResponseFixture
_faker.Date.Recent().ToUniversalTime(),
_faker.Company.CompanyName(),
resolvedCreatedOnUtc,
_faker.Random.Bool() ? _faker.Date.Recent().ToUniversalTime() : null
_faker.Random.Bool() ? _faker.Date.Recent().ToUniversalTime() : null,
coverPath ?? (_faker.Random.Bool() ? _faker.System.FilePath() : null)
);
}