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,45 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Themes;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Themes;
/// <summary>
/// Fixture class for the <see cref="ThemeArchiveResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class ThemeArchiveResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="ThemeArchiveResponse"/>.
/// </summary>
/// <param name="bytes">Optional. The bytes of the ZIP archive.</param>
/// <param name="fileName">Optional. The file name to expose when downloading the archive.</param>
/// <param name="contentType">Optional. The MIME content type of the archive.</param>
/// <returns>The created <see cref="ThemeArchiveResponse"/>.</returns>
public ThemeArchiveResponse Create(byte[]? bytes = null, string? fileName = null, string? contentType = null)
{
return new ThemeArchiveResponse(
bytes ?? Encoding.UTF8.GetBytes(_faker.Lorem.Paragraph()),
fileName ?? $"{_faker.Lorem.Word()}.zip",
contentType ?? _faker.System.MimeType());
}
/// <summary>
/// Creates a list of <see cref="ThemeArchiveResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<ThemeArchiveResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,43 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Themes;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Themes;
/// <summary>
/// Fixture class for the <see cref="ThemeAssetResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class ThemeAssetResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="ThemeAssetResponse"/>.
/// </summary>
/// <param name="bytes">Optional. The bytes of the asset file.</param>
/// <param name="contentType">Optional. The MIME content type of the asset file.</param>
/// <returns>The created <see cref="ThemeAssetResponse"/>.</returns>
public ThemeAssetResponse Create(byte[]? bytes = null, string? contentType = null)
{
return new ThemeAssetResponse(
bytes ?? Encoding.UTF8.GetBytes(_faker.Lorem.Paragraph()),
contentType ?? _faker.System.MimeType());
}
/// <summary>
/// Creates a list of <see cref="ThemeAssetResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<ThemeAssetResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,76 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Themes;
using Lumina.Domain.SharedKernel.Common.Enums.Themes;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Themes;
/// <summary>
/// Fixture class for the <see cref="ThemeResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class ThemeResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="ThemeResponse"/>.
/// </summary>
/// <param name="id">Optional. The Id of the theme.</param>
/// <param name="themeId">Optional. The manifest id of the theme.</param>
/// <param name="name">Optional. The display name of the theme.</param>
/// <param name="description">Optional. The description of the theme.</param>
/// <param name="author">Optional. The author of the theme.</param>
/// <param name="version">Optional. The version of the theme.</param>
/// <param name="previewPath">Optional. The preview image path of the theme, or <see langword="null"/> when the theme has no preview.</param>
/// <param name="installSource">Optional. The source the theme was installed from.</param>
/// <param name="isCurrent">Optional. Whether the theme is the currently active one.</param>
/// <param name="installedAtUtc">Optional. The UTC timestamp when the theme was installed.</param>
/// <param name="isDeleted">Optional. Whether the theme was deleted by the user.</param>
/// <param name="includePreviewPath">Whether the preview path should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeIsCurrent">Whether the currently active flag should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="ThemeResponse"/>.</returns>
public ThemeResponse Create(
Guid? id = null,
string? themeId = null,
string? name = null,
string? description = null,
string? author = null,
string? version = null,
string? previewPath = null,
ThemeInstallSource? installSource = null,
bool? isCurrent = null,
DateTime? installedAtUtc = null,
bool? isDeleted = null,
bool includePreviewPath = false,
bool includeIsCurrent = false)
{
return new ThemeResponse(
id ?? Guid.NewGuid(),
themeId ?? _faker.Lorem.Slug(2),
name ?? _faker.Commerce.ProductName(),
description ?? _faker.Lorem.Sentence(),
author ?? _faker.Name.FullName(),
version ?? _faker.System.Semver(),
includePreviewPath ? (previewPath ?? (_faker.Random.Bool() ? _faker.System.FilePath() : null)) : null,
installSource ?? _faker.PickRandom<ThemeInstallSource>(),
includeIsCurrent ? (isCurrent ?? (_faker.Random.Bool() ? true : null)) : null,
installedAtUtc ?? _faker.Date.Recent().ToUniversalTime(),
isDeleted ?? _faker.Random.Bool());
}
/// <summary>
/// Creates a list of <see cref="ThemeResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<ThemeResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,43 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Themes;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Themes;
/// <summary>
/// Fixture class for the <see cref="ThemeSettingsResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class ThemeSettingsResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="ThemeSettingsResponse"/>.
/// </summary>
/// <param name="maxArchiveBytes">Optional. The maximum allowed size of a theme archive, in bytes.</param>
/// <param name="defaultThemeId">Optional. The identifier of the default theme.</param>
/// <returns>The created <see cref="ThemeSettingsResponse"/>.</returns>
public ThemeSettingsResponse Create(
long? maxArchiveBytes = null,
string? defaultThemeId = null)
{
return new ThemeSettingsResponse(
maxArchiveBytes ?? _faker.Random.Long(1_000_000, 100_000_000),
defaultThemeId ?? _faker.Lorem.Slug(2));
}
/// <summary>
/// Creates a list of <see cref="ThemeSettingsResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<ThemeSettingsResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,42 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Themes;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Themes;
/// <summary>
/// Fixture class for the <see cref="ThemeTemplateResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class ThemeTemplateResponseFixture
{
private readonly Faker _faker = new();
private readonly ThemeResponseFixture _themeResponseFixture = new();
/// <summary>
/// Creates a random valid <see cref="ThemeTemplateResponse"/>.
/// </summary>
/// <param name="theme">Optional. The theme the template belongs to.</param>
/// <param name="template">Optional. The sanitized content of the template.</param>
/// <returns>The created <see cref="ThemeTemplateResponse"/>.</returns>
public ThemeTemplateResponse Create(ThemeResponse? theme = null, string? template = null)
{
return new ThemeTemplateResponse(
theme ?? _themeResponseFixture.Create(),
template ?? _faker.Lorem.Paragraph());
}
/// <summary>
/// Creates a list of <see cref="ThemeTemplateResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<ThemeTemplateResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}