Adds tests for the book reading feature

This commit is contained in:
BinaryAlley committed 2026-09-02 04:45:51 -07:00
1 parent f7ccdf3d1c
commit 3a3c0c047c
192 files changed
+14104 -342

No files matched your search

@@ -25,6 +25,8 @@ public class UserSettingsFixture
/// <param name="shouldIgnoreThePrefixForAlphaPicker">Whether the "The" prefix of library item titles is ignored by the alpha picker.</param>
/// <param name="isThemeCachingEnabled">Whether the theme data served to this user is cached.</param>
/// <param name="shouldAggregateMetadataWhenMissing">Whether the metadata of the media library items is aggregated from multiple providers, when fields are missing.</param>
/// <param name="shouldRenderPdfAsImages">Whether PDF books are rendered as page images for the user.</param>
/// <param name="shouldPreserveBookStyles">Whether the styles of the book content are preserved when it is rendered for the user.</param>
/// <returns>The created <see cref="UserSettings"/>.</returns>
public UserSettings Create(
Guid? userId = null,
@@ -32,7 +34,9 @@ public class UserSettingsFixture
int itemsPerPage = 48,
bool shouldIgnoreThePrefixForAlphaPicker = false,
bool isThemeCachingEnabled = true,
bool shouldAggregateMetadataWhenMissing = false)
bool shouldAggregateMetadataWhenMissing = false,
bool shouldRenderPdfAsImages = false,
bool shouldPreserveBookStyles = true)
{
Result<UserSettings> settings = UserSettings.Create(
userId is null ? UserId.CreateUnique() : UserId.Create(userId.Value),
@@ -40,7 +44,9 @@ public class UserSettingsFixture
itemsPerPage,
shouldIgnoreThePrefixForAlphaPicker,
isThemeCachingEnabled,
shouldAggregateMetadataWhenMissing);
shouldAggregateMetadataWhenMissing,
shouldRenderPdfAsImages,
shouldPreserveBookStyles);
return settings.Value;
}