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,50 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Plugins;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Plugins;
/// <summary>
/// Fixture class for the <see cref="LibraryArtworkProviderResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class LibraryArtworkProviderResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="LibraryArtworkProviderResponse"/>.
/// </summary>
/// <param name="pluginId">Optional. The Id of the plugin providing the artwork.</param>
/// <param name="name">Optional. The display name of the artwork provider.</param>
/// <param name="isEnabled">Optional. Whether the artwork provider is enabled for the media library.</param>
/// <param name="rank">Optional. The rank of the artwork provider.</param>
/// <returns>The created <see cref="LibraryArtworkProviderResponse"/>.</returns>
public LibraryArtworkProviderResponse Create(
Guid? pluginId = null,
string? name = null,
bool? isEnabled = null,
int? rank = null)
{
return new LibraryArtworkProviderResponse(
pluginId ?? Guid.NewGuid(),
name ?? _faker.Company.CompanyName(),
isEnabled ?? _faker.Random.Bool(),
rank ?? _faker.Random.Int(1, 100));
}
/// <summary>
/// Creates a list of <see cref="LibraryArtworkProviderResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<LibraryArtworkProviderResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,48 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.Responses.Plugins;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Plugins;
/// <summary>
/// Fixture class for the <see cref="LibraryBookReaderResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class LibraryBookReaderResponseFixture
{
/// <summary>
/// Creates a random valid <see cref="LibraryBookReaderResponse"/>.
/// </summary>
/// <param name="pluginId">Optional. The unique identifier of the plugin providing the book reader.</param>
/// <param name="name">Optional. The display name of the book reader.</param>
/// <param name="supportedExtensions">Optional. The file extensions supported by the book reader.</param>
/// <param name="isEnabled">Optional. Whether the book reader is enabled for the media library.</param>
/// <returns>The created <see cref="LibraryBookReaderResponse"/>.</returns>
public LibraryBookReaderResponse Create(
Guid? pluginId = null,
string? name = null,
IReadOnlyList<string>? supportedExtensions = null,
bool? isEnabled = null)
{
return new LibraryBookReaderResponse(
pluginId ?? Guid.NewGuid(),
name ?? $"Reader {Guid.NewGuid():N}",
supportedExtensions ?? [".epub", ".pdf"],
isEnabled ?? true
);
}
/// <summary>
/// Creates a list of <see cref="LibraryBookReaderResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<LibraryBookReaderResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,50 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Plugins;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Plugins;
/// <summary>
/// Fixture class for the <see cref="LibraryMetadataProviderResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class LibraryMetadataProviderResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="LibraryMetadataProviderResponse"/>.
/// </summary>
/// <param name="pluginId">Optional. The Id of the plugin providing the metadata.</param>
/// <param name="name">Optional. The display name of the metadata provider.</param>
/// <param name="isEnabled">Optional. Whether the metadata provider is enabled for the media library.</param>
/// <param name="rank">Optional. The rank of the metadata provider.</param>
/// <returns>The created <see cref="LibraryMetadataProviderResponse"/>.</returns>
public LibraryMetadataProviderResponse Create(
Guid? pluginId = null,
string? name = null,
bool? isEnabled = null,
int? rank = null)
{
return new LibraryMetadataProviderResponse(
pluginId ?? Guid.NewGuid(),
name ?? _faker.Company.CompanyName(),
isEnabled ?? _faker.Random.Bool(),
rank ?? _faker.Random.Int(1, 100));
}
/// <summary>
/// Creates a list of <see cref="LibraryMetadataProviderResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<LibraryMetadataProviderResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,67 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Plugins;
using Lumina.Domain.SharedKernel.Common.Enums.Plugins;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Plugins;
/// <summary>
/// Fixture class for the <see cref="PluginResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class PluginResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="PluginResponse"/>.
/// </summary>
/// <param name="id">Optional. The Id of the plugin.</param>
/// <param name="name">Optional. The display name of the plugin.</param>
/// <param name="author">Optional. The author of the plugin.</param>
/// <param name="version">Optional. The version of the plugin.</param>
/// <param name="description">Optional. The description of the plugin.</param>
/// <param name="loadStatus">Optional. The load status of the plugin.</param>
/// <param name="loadError">Optional. The error message when the plugin failed to load.</param>
/// <param name="settings">Optional. The settings of the plugin.</param>
/// <returns>The created <see cref="PluginResponse"/>.</returns>
public PluginResponse Create(
Guid? id = null,
string? name = null,
string? author = null,
string? version = null,
string? description = null,
PluginLoadStatus? loadStatus = null,
string? loadError = null,
IReadOnlyDictionary<string, string>? settings = null)
{
return new PluginResponse(
id ?? Guid.NewGuid(),
name ?? _faker.Commerce.ProductName(),
author ?? _faker.Company.CompanyName(),
version ?? _faker.System.Semver(),
description ?? _faker.Lorem.Sentence(),
loadStatus ?? _faker.PickRandom<PluginLoadStatus>(),
loadError,
settings ?? new Dictionary<string, string>
{
[_faker.Lorem.Word()] = _faker.Lorem.Word()
}
);
}
/// <summary>
/// Creates a list of <see cref="PluginResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<PluginResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,54 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Plugins;
using Lumina.Domain.SharedKernel.Common.Enums.Plugins;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Plugins;
/// <summary>
/// Fixture class for the <see cref="PluginSettingDescriptorResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class PluginSettingDescriptorResponseFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="PluginSettingDescriptorResponse"/>.
/// </summary>
/// <param name="key">Optional. The unique key of the setting.</param>
/// <param name="label">Optional. The display label of the setting.</param>
/// <param name="type">Optional. The type of the setting.</param>
/// <param name="defaultValue">Optional. The default value of the setting.</param>
/// <param name="allowedValues">Optional. The list of allowed values, when the setting is a selection.</param>
/// <returns>The created <see cref="PluginSettingDescriptorResponse"/>.</returns>
public PluginSettingDescriptorResponse Create(
string? key = null,
string? label = null,
PluginSettingType? type = null,
string? defaultValue = null,
IReadOnlyList<string>? allowedValues = null)
{
return new PluginSettingDescriptorResponse(
key ?? _faker.Lorem.Word(),
label ?? _faker.Lorem.Word(),
type ?? _faker.PickRandom<PluginSettingType>(),
defaultValue,
allowedValues ?? [_faker.Lorem.Word(), _faker.Lorem.Word()]
);
}
/// <summary>
/// Creates a list of <see cref="PluginSettingDescriptorResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<PluginSettingDescriptorResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,52 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Responses.Plugins;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Responses.Plugins;
/// <summary>
/// Fixture class for the <see cref="PluginSettingsResponse"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class PluginSettingsResponseFixture
{
private readonly Faker _faker = new();
private readonly PluginSettingDescriptorResponseFixture _pluginSettingDescriptorResponseFixture = new();
/// <summary>
/// Creates a random valid <see cref="PluginSettingsResponse"/>.
/// </summary>
/// <param name="pluginId">Optional. The Id of the plugin.</param>
/// <param name="schema">Optional. The schema of the plugin settings.</param>
/// <param name="settings">Optional. The current values of the plugin settings.</param>
/// <returns>The created <see cref="PluginSettingsResponse"/>.</returns>
public PluginSettingsResponse Create(
Guid? pluginId = null,
IReadOnlyList<PluginSettingDescriptorResponse>? schema = null,
IReadOnlyDictionary<string, string>? settings = null)
{
return new PluginSettingsResponse(
pluginId ?? Guid.NewGuid(),
schema ?? _pluginSettingDescriptorResponseFixture.CreateMany(3),
settings ?? new Dictionary<string, string>
{
[_faker.Lorem.Word()] = _faker.Lorem.Word()
}
);
}
/// <summary>
/// Creates a list of <see cref="PluginSettingsResponse"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<PluginSettingsResponse> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}