Renames project paths from Lumina to Nemera

This commit is contained in:
BinaryAlley committed 2026-11-27 15:34:43 +02:00
1 parent ce6fddb4c9
commit 0f659a4877
6450 files changed

No files matched your search

@@ -0,0 +1,44 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Domain.Common.Primitives;
using Lumina.Domain.Core.BoundedContexts.UserManagementBoundedContext.UserAggregate;
using Lumina.Domain.Core.BoundedContexts.UserManagementBoundedContext.UserAggregate.ValueObjects;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Domain.Fixtures.Core.BoundedContexts.UserManagementBoundedContext.UserAggregate;
/// <summary>
/// Fixture class for the <see cref="User"/> domain aggregate.
/// </summary>
[ExcludeFromCodeCoverage]
public class UserFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="User"/> domain aggregate.
/// </summary>
/// <param name="id">Optional. The user Id.</param>
/// <param name="username">Optional. The username of the user.</param>
/// <returns>The created <see cref="User"/>.</returns>
public User Create(Guid? id = null, string? username = null)
{
UserId userId = id is null ? UserId.CreateUnique() : UserId.Create(id.Value);
Result<User> user = User.Create(userId, username ?? _faker.Internet.UserName());
return user.Value;
}
/// <summary>
/// Creates multiple <see cref="User"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="User"/> instances.</returns>
public List<User> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,36 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Core.BoundedContexts.UserManagementBoundedContext.UserAggregate.ValueObjects;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Domain.Fixtures.Core.BoundedContexts.UserManagementBoundedContext.UserAggregate.ValueObjects;
/// <summary>
/// Fixture class for the <see cref="UserId"/> value object.
/// </summary>
[ExcludeFromCodeCoverage]
public class UserIdFixture
{
/// <summary>
/// Creates a random valid <see cref="UserId"/>.
/// </summary>
/// <param name="value">Optional. The raw value of the user Id.</param>
/// <returns>The created <see cref="UserId"/>.</returns>
public UserId Create(Guid? value = null)
{
return UserId.Create(value ?? Guid.NewGuid());
}
/// <summary>
/// Creates a list of <see cref="UserId"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="UserId"/> instances.</returns>
public List<UserId> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,114 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Common.Primitives;
using Lumina.Domain.Core.BoundedContexts.UserManagementBoundedContext.UserAggregate.ValueObjects;
using Lumina.Domain.Core.BoundedContexts.UserManagementBoundedContext.UserSettingsAggregate;
using Lumina.Domain.SharedKernel.Common.Enums.Playback;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Domain.Fixtures.Core.BoundedContexts.UserManagementBoundedContext.UserSettingsAggregate;
/// <summary>
/// Fixture class for the <see cref="UserSettings"/> domain aggregate.
/// </summary>
[ExcludeFromCodeCoverage]
public class UserSettingsFixture
{
/// <summary>
/// Creates a random valid <see cref="UserSettings"/> domain aggregate.
/// </summary>
/// <param name="userId">Optional. The Id of the user that owns the settings.</param>
/// <param name="isPaginationEnabled">Whether pagination is enabled for the user.</param>
/// <param name="itemsPerPage">The number of library items displayed per page when pagination is enabled.</param>
/// <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="shouldAggregateArtworkWhenMissing">Whether the artwork of the media library items is aggregated from multiple providers, when it is 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>
/// <param name="shouldKeepDownloadingWhilePaused">Whether the player keeps downloading a track while playback is paused.</param>
/// <param name="shouldAutoplay">Whether the player continues playback at the end of an album or artist.</param>
/// <param name="isGaplessPlaybackEnabled">Whether the player transitions between consecutive tracks without a gap.</param>
/// <param name="replayGainMode">The way ReplayGain normalization is applied to the tracks the user plays.</param>
/// <param name="streamingQuality">The quality cap applied to the audio the server normalizes for the user.</param>
/// <param name="vuMeterOrientation">The direction in which each channel of the VU meter of the audio player grows.</param>
/// <param name="vuMeterSegmentCount">The number of segments each channel of the VU meter is divided into.</param>
/// <param name="vuMeterSegmentGap">The gap, in pixels, between the segments and the channels of the VU meter.</param>
/// <param name="vuMeterMediumThreshold">The level above which a segment of the VU meter is drawn with its medium state.</param>
/// <param name="vuMeterHighThreshold">The level above which a segment of the VU meter is drawn with its high state.</param>
/// <param name="vuMeterShowPeak">Whether the VU meter holds the peak level of each channel after it falls.</param>
/// <param name="vuMeterPeakHoldDurationInMilliseconds">The time a peak of the VU meter is held before it starts falling.</param>
/// <param name="vuMeterReleasePerSecond">The number of level units the display of the VU meter falls per second when the input level drops.</param>
/// <param name="vuMeterPeakReleasePerSecond">The number of level units the peak of the VU meter falls per second after its hold time elapsed.</param>
/// <param name="volume">The last volume the player reported for the user.</param>
/// <param name="isMuted">The last mute state the player reported for the user.</param>
/// <returns>The created <see cref="UserSettings"/>.</returns>
public UserSettings Create(
Guid? userId = null,
bool isPaginationEnabled = true,
int itemsPerPage = 48,
bool shouldIgnoreThePrefixForAlphaPicker = false,
bool isThemeCachingEnabled = true,
bool shouldAggregateMetadataWhenMissing = false,
bool shouldAggregateArtworkWhenMissing = false,
bool shouldRenderPdfAsImages = false,
bool shouldPreserveBookStyles = true,
bool shouldKeepDownloadingWhilePaused = true,
bool shouldAutoplay = true,
bool isGaplessPlaybackEnabled = true,
ReplayGainMode replayGainMode = ReplayGainMode.Off,
PlaybackStreamingQuality streamingQuality = PlaybackStreamingQuality.Auto,
VuMeterOrientation vuMeterOrientation = VuMeterOrientation.Vertical,
int vuMeterSegmentCount = 12,
int vuMeterSegmentGap = 1,
double vuMeterMediumThreshold = 0.6,
double vuMeterHighThreshold = 0.8,
bool vuMeterShowPeak = true,
int vuMeterPeakHoldDurationInMilliseconds = 650,
double vuMeterReleasePerSecond = 3.0,
double vuMeterPeakReleasePerSecond = 0.65,
double volume = 1.0,
bool isMuted = false)
{
Result<UserSettings> settings = UserSettings.Create(
userId is null ? UserId.CreateUnique() : UserId.Create(userId.Value),
isPaginationEnabled,
itemsPerPage,
shouldIgnoreThePrefixForAlphaPicker,
isThemeCachingEnabled,
shouldAggregateMetadataWhenMissing,
shouldAggregateArtworkWhenMissing,
shouldRenderPdfAsImages,
shouldPreserveBookStyles,
shouldKeepDownloadingWhilePaused,
shouldAutoplay,
isGaplessPlaybackEnabled,
replayGainMode,
streamingQuality,
vuMeterOrientation,
vuMeterSegmentCount,
vuMeterSegmentGap,
vuMeterMediumThreshold,
vuMeterHighThreshold,
vuMeterShowPeak,
vuMeterPeakHoldDurationInMilliseconds,
vuMeterReleasePerSecond,
vuMeterPeakReleasePerSecond,
volume,
isMuted);
return settings.Value;
}
/// <summary>
/// Creates multiple <see cref="UserSettings"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="UserSettings"/> instances.</returns>
public List<UserSettings> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,36 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Core.BoundedContexts.UserManagementBoundedContext.UserSettingsAggregate.ValueObjects;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Domain.Fixtures.Core.BoundedContexts.UserManagementBoundedContext.UserSettingsAggregate.ValueObjects;
/// <summary>
/// Fixture class for the <see cref="UserSettingsId"/> value object.
/// </summary>
[ExcludeFromCodeCoverage]
public class UserSettingsIdFixture
{
/// <summary>
/// Creates a random valid <see cref="UserSettingsId"/>.
/// </summary>
/// <param name="value">Optional. The raw value of the user settings Id.</param>
/// <returns>The created <see cref="UserSettingsId"/>.</returns>
public UserSettingsId Create(Guid? value = null)
{
return UserSettingsId.Create(value ?? Guid.NewGuid());
}
/// <summary>
/// Creates a list of <see cref="UserSettingsId"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="UserSettingsId"/> instances.</returns>
public List<UserSettingsId> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}