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,55 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Common;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Responses.Common;
/// <summary>
/// Fixture class for the <see cref="PaginatedResponse{TData}"/> record.
/// </summary>
/// <typeparam name="TData">The type of the data items contained in the paginated response.</typeparam>
[ExcludeFromCodeCoverage]
public class PaginatedResponseFixture<TData>
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="PaginatedResponse{TData}"/>.
/// </summary>
/// <param name="data">Optional. The collection of data items.</param>
/// <param name="currentPage">Optional. The current page number.</param>
/// <param name="perPage">Optional. The number of items per page.</param>
/// <param name="count">Optional. The total number of elements available.</param>
/// <param name="numberOfPages">Optional. The total number of pages.</param>
/// <returns>The created <see cref="PaginatedResponse{TData}"/>.</returns>
public PaginatedResponse<TData> Create(
IReadOnlyList<TData>? data = null,
int? currentPage = null,
int? perPage = null,
int? count = null,
int? numberOfPages = null)
{
return new PaginatedResponse<TData>
{
Data = data ?? [],
CurrentPage = currentPage ?? _faker.Random.Int(1, 10),
PerPage = perPage ?? _faker.Random.Int(1, 100),
Count = count ?? _faker.Random.Int(0, 1000),
NumberOfPages = numberOfPages ?? _faker.Random.Int(1, 100)
};
}
/// <summary>
/// Creates a list of <see cref="PaginatedResponse{TData}"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="PaginatedResponse{TData}"/> instances.</returns>
public List<PaginatedResponse<TData>> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,61 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Albums;
/// <summary>
/// Fixture class for the <see cref="DeletedAlbumResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class DeletedAlbumResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="DeletedAlbumResponse"/>.
/// </summary>
/// <param name="id">Optional. The Id of the deleted album.</param>
/// <param name="libraryId">Optional. The Id of the media library the deleted album belongs to.</param>
/// <param name="artistId">Optional. The Id of the artist the deleted album belongs to.</param>
/// <param name="artistName">Optional. The name of the artist the deleted album belongs to.</param>
/// <param name="title">Optional. The title of the deleted album.</param>
/// <param name="deletedOnUtc">Optional. The date and time when the album was deleted.</param>
/// <param name="coverPath">Optional. The path of the cover image of the deleted album.</param>
/// <param name="includeCoverPath">Whether the cover path should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="DeletedAlbumResponse"/>.</returns>
public DeletedAlbumResponse Create(
Guid? id = null,
Guid? libraryId = null,
Guid? artistId = null,
string? artistName = null,
string? title = null,
DateTime? deletedOnUtc = null,
string? coverPath = null,
bool includeCoverPath = true)
{
return new DeletedAlbumResponse(
id ?? _faker.Random.Guid(),
libraryId ?? _faker.Random.Guid(),
artistId ?? _faker.Random.Guid(),
artistName ?? _faker.Name.FullName(),
title ?? _faker.Music.Genre(),
deletedOnUtc ?? _faker.Date.Recent().ToUniversalTime(),
includeCoverPath ? (coverPath ?? $"/covers/{_faker.Random.Guid()}.jpg") : null);
}
/// <summary>
/// Creates a list of <see cref="DeletedAlbumResponse"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="DeletedAlbumResponse"/> instances.</returns>
public List<DeletedAlbumResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,55 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Artists;
/// <summary>
/// Fixture class for the <see cref="DeletedArtistResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class DeletedArtistResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="DeletedArtistResponse"/>.
/// </summary>
/// <param name="id">Optional. The Id of the deleted artist.</param>
/// <param name="libraryId">Optional. The Id of the media library the deleted artist belongs to.</param>
/// <param name="name">Optional. The name of the deleted artist.</param>
/// <param name="deletedOnUtc">Optional. The date and time when the artist was deleted.</param>
/// <param name="coverPath">Optional. The path of the cover image of the deleted artist.</param>
/// <param name="includeCoverPath">Whether the cover path should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="DeletedArtistResponse"/>.</returns>
public DeletedArtistResponse Create(
Guid? id = null,
Guid? libraryId = null,
string? name = null,
DateTime? deletedOnUtc = null,
string? coverPath = null,
bool includeCoverPath = true)
{
return new DeletedArtistResponse(
id ?? _faker.Random.Guid(),
libraryId ?? _faker.Random.Guid(),
name ?? _faker.Name.FullName(),
deletedOnUtc ?? _faker.Date.Recent().ToUniversalTime(),
includeCoverPath ? (coverPath ?? $"/covers/{_faker.Random.Guid()}.jpg") : null);
}
/// <summary>
/// Creates a list of <see cref="DeletedArtistResponse"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="DeletedArtistResponse"/> instances.</returns>
public List<DeletedArtistResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,65 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Responses.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
/// <summary>
/// Fixture class for the <see cref="DeletedTrackResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class DeletedTrackResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="DeletedTrackResponse"/>.
/// </summary>
/// <param name="id">Optional. The Id of the deleted track.</param>
/// <param name="libraryId">Optional. The Id of the media library the deleted track belongs to.</param>
/// <param name="artistId">Optional. The Id of the artist the deleted track belongs to.</param>
/// <param name="artistName">Optional. The name of the artist the deleted track belongs to.</param>
/// <param name="albumId">Optional. The Id of the album the deleted track belongs to.</param>
/// <param name="albumTitle">Optional. The title of the album the deleted track belongs to.</param>
/// <param name="title">Optional. The title of the deleted track.</param>
/// <param name="path">Optional. The file system path of the deleted track.</param>
/// <param name="deletedOnUtc">Optional. The date and time when the track was deleted.</param>
/// <returns>The created <see cref="DeletedTrackResponse"/>.</returns>
public DeletedTrackResponse Create(
Guid? id = null,
Guid? libraryId = null,
Guid? artistId = null,
string? artistName = null,
Guid? albumId = null,
string? albumTitle = null,
string? title = null,
string? path = null,
DateTime? deletedOnUtc = null)
{
return new DeletedTrackResponse(
id ?? _faker.Random.Guid(),
libraryId ?? _faker.Random.Guid(),
artistId ?? _faker.Random.Guid(),
artistName ?? _faker.Name.FullName(),
albumId ?? _faker.Random.Guid(),
albumTitle ?? _faker.Music.Genre(),
title ?? _faker.Music.Genre(),
path ?? $"/music/tracks/{_faker.Random.Guid()}.flac",
deletedOnUtc ?? _faker.Date.Recent().ToUniversalTime());
}
/// <summary>
/// Creates a list of <see cref="DeletedTrackResponse"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="DeletedTrackResponse"/> instances.</returns>
public List<DeletedTrackResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,64 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books;
/// <summary>
/// Fixture class for the <see cref="DeletedBookResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class DeletedBookResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="DeletedBookResponse"/>.
/// </summary>
/// <param name="id">Optional. The Id of the deleted book.</param>
/// <param name="libraryId">Optional. The Id of the media library the deleted book belongs to.</param>
/// <param name="title">Optional. The title of the deleted book.</param>
/// <param name="originalTitle">Optional. The original title of the deleted book.</param>
/// <param name="path">Optional. The file system path of the deleted book.</param>
/// <param name="deletedOnUtc">Optional. The date and time when the book was deleted.</param>
/// <param name="coverPath">Optional. The path of the cover image of the deleted book.</param>
/// <param name="includeOriginalTitle">Whether the original title should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeCoverPath">Whether the cover path should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="DeletedBookResponse"/>.</returns>
public DeletedBookResponse Create(
Guid? id = null,
Guid? libraryId = null,
string? title = null,
string? originalTitle = null,
string? path = null,
DateTime? deletedOnUtc = null,
string? coverPath = null,
bool includeOriginalTitle = true,
bool includeCoverPath = true)
{
return new DeletedBookResponse(
id ?? _faker.Random.Guid(),
libraryId ?? _faker.Random.Guid(),
title ?? _faker.Lorem.Sentence(3),
includeOriginalTitle ? (originalTitle ?? _faker.Lorem.Sentence(3)) : null,
path ?? _faker.System.FilePath(),
deletedOnUtc ?? _faker.Date.Recent(),
includeCoverPath ? (coverPath ?? $"/covers/{_faker.Random.Guid()}.jpg") : null
);
}
/// <summary>
/// Creates a list of <see cref="DeletedBookResponse"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="DeletedBookResponse"/> instances.</returns>
public List<DeletedBookResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}