mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 16:11:10 +00:00
Renames project paths from Lumina to Nemera
This commit is contained in:
1 parent
ce6fddb4c9
commit
0f659a4877
6450 files changed
No files matched your search
+44
@@ -0,0 +1,44 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Application.Core.Plugins.Commands.InstallPlugin;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Commands.InstallPlugin;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="InstallPluginCommand"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class InstallPluginCommandFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a valid <see cref="InstallPluginCommand"/>.
|
||||
/// </summary>
|
||||
/// <param name="archive">Optional. The archive stream of the uploaded plugin.</param>
|
||||
/// <param name="fileName">Optional. The file name of the uploaded plugin.</param>
|
||||
/// <returns>The created <see cref="InstallPluginCommand"/>.</returns>
|
||||
public InstallPluginCommand Create(
|
||||
Stream? archive = null,
|
||||
string? fileName = null)
|
||||
{
|
||||
return new InstallPluginCommand(
|
||||
archive ?? new MemoryStream(_faker.Random.Bytes(64)),
|
||||
fileName ?? $"{_faker.Hacker.Noun()}.dll");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="InstallPluginCommand"/> instances with randomized test data.
|
||||
/// </summary>
|
||||
/// <param name="count">Number of instances to create.</param>
|
||||
/// <returns>List of configured <see cref="InstallPluginCommand"/> instances.</returns>
|
||||
public List<InstallPluginCommand> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Application.Core.Plugins.Commands.UpdatePluginSettings;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Commands.UpdatePluginSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="UpdatePluginSettingsCommand"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class UpdatePluginSettingsCommandFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid command to update the settings of a plugin.
|
||||
/// </summary>
|
||||
/// <param name="pluginId">Optional. The Id of the plugin.</param>
|
||||
/// <param name="settings">Optional. The settings of the plugin.</param>
|
||||
/// <returns>The created command.</returns>
|
||||
public UpdatePluginSettingsCommand Create(Guid? pluginId = null, IReadOnlyDictionary<string, string>? settings = null)
|
||||
{
|
||||
return new Faker<UpdatePluginSettingsCommand>()
|
||||
.CustomInstantiator(f => new UpdatePluginSettingsCommand(
|
||||
default,
|
||||
default!))
|
||||
.RuleFor(x => x.PluginId, pluginId ?? Guid.NewGuid())
|
||||
.RuleFor(x => x.Settings, f => settings ?? new Dictionary<string, string> { [f.Lorem.Word()] = f.Lorem.Word() })
|
||||
.Generate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="UpdatePluginSettingsCommand"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<UpdatePluginSettingsCommand> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Application.Core.Plugins.Queries.GetLibraryArtworkProviders;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Queries.GetLibraryArtworkProviders;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetLibraryArtworkProvidersQuery"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetLibraryArtworkProvidersQueryFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get the artwork providers of a media library.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">Optional. The Id of the media library whose artwork providers are retrieved.</param>
|
||||
/// <returns>The created query.</returns>
|
||||
public GetLibraryArtworkProvidersQuery Create(
|
||||
Guid? libraryId = null)
|
||||
{
|
||||
return new Faker<GetLibraryArtworkProvidersQuery>()
|
||||
.CustomInstantiator(f => new GetLibraryArtworkProvidersQuery(
|
||||
libraryId ?? Guid.NewGuid()))
|
||||
.Generate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetLibraryArtworkProvidersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetLibraryArtworkProvidersQuery> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Core.Plugins.Queries.GetLibraryBookReaders;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Queries.GetLibraryBookReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetLibraryBookReadersQuery"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetLibraryBookReadersQueryFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get the book readers configured for a media library.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">Optional. The Id of the media library whose book readers are retrieved.</param>
|
||||
/// <returns>The created <see cref="GetLibraryBookReadersQuery"/>.</returns>
|
||||
public GetLibraryBookReadersQuery Create(
|
||||
Guid? libraryId = null)
|
||||
{
|
||||
return new GetLibraryBookReadersQuery(libraryId ?? Guid.NewGuid());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetLibraryBookReadersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetLibraryBookReadersQuery> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Application.Core.Plugins.Queries.GetLibraryMetadataProviders;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Queries.GetLibraryMetadataProviders;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetLibraryMetadataProvidersQuery"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetLibraryMetadataProvidersQueryFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get the metadata providers of a media library.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">Optional. The Id of the media library whose metadata providers are retrieved.</param>
|
||||
/// <returns>The created query.</returns>
|
||||
public GetLibraryMetadataProvidersQuery Create(Guid? libraryId = null)
|
||||
{
|
||||
return new Faker<GetLibraryMetadataProvidersQuery>()
|
||||
.CustomInstantiator(f => new GetLibraryMetadataProvidersQuery(
|
||||
libraryId ?? Guid.NewGuid()))
|
||||
.Generate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetLibraryMetadataProvidersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetLibraryMetadataProvidersQuery> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Core.Plugins.Queries.GetLibraryTypeArtworkProviders;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Queries.GetLibraryTypeArtworkProviders;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetLibraryTypeArtworkProvidersQuery"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetLibraryTypeArtworkProvidersQueryFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="GetLibraryTypeArtworkProvidersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="libraryType">Optional. The media library type whose available artwork providers are retrieved.</param>
|
||||
/// <returns>The created <see cref="GetLibraryTypeArtworkProvidersQuery"/>.</returns>
|
||||
public GetLibraryTypeArtworkProvidersQuery Create(string? libraryType = null)
|
||||
{
|
||||
return new GetLibraryTypeArtworkProvidersQuery(libraryType ?? "Book");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetLibraryTypeArtworkProvidersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetLibraryTypeArtworkProvidersQuery> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Core.Plugins.Queries.GetLibraryTypeBookReaders;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Queries.GetLibraryTypeBookReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetLibraryTypeBookReadersQuery"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetLibraryTypeBookReadersQueryFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="GetLibraryTypeBookReadersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="libraryType">Optional. The media library type whose available book readers are retrieved.</param>
|
||||
/// <returns>The created <see cref="GetLibraryTypeBookReadersQuery"/>.</returns>
|
||||
public GetLibraryTypeBookReadersQuery Create(string? libraryType = null)
|
||||
{
|
||||
return new GetLibraryTypeBookReadersQuery(libraryType ?? "Book");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetLibraryTypeBookReadersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetLibraryTypeBookReadersQuery> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Core.Plugins.Queries.GetLibraryTypeMetadataProviders;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Queries.GetLibraryTypeMetadataProviders;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetLibraryTypeMetadataProvidersQuery"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetLibraryTypeMetadataProvidersQueryFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="GetLibraryTypeMetadataProvidersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="libraryType">Optional. The media library type whose available metadata providers are retrieved.</param>
|
||||
/// <returns>The created <see cref="GetLibraryTypeMetadataProvidersQuery"/>.</returns>
|
||||
public GetLibraryTypeMetadataProvidersQuery Create(string? libraryType = null)
|
||||
{
|
||||
return new GetLibraryTypeMetadataProvidersQuery(libraryType ?? "Book");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetLibraryTypeMetadataProvidersQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetLibraryTypeMetadataProvidersQuery> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Application.Core.Plugins.Queries.GetPluginSettings;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Queries.GetPluginSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetPluginSettingsQuery"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPluginSettingsQueryFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get the settings of a plugin.
|
||||
/// </summary>
|
||||
/// <param name="pluginId">Optional. The unique identifier of the plugin.</param>
|
||||
/// <returns>The created query.</returns>
|
||||
public GetPluginSettingsQuery Create(Guid? pluginId = null)
|
||||
{
|
||||
return new Faker<GetPluginSettingsQuery>()
|
||||
.CustomInstantiator(f => new GetPluginSettingsQuery(
|
||||
pluginId ?? Guid.NewGuid()))
|
||||
.Generate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetPluginSettingsQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetPluginSettingsQuery> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Core.Plugins.Queries.GetPlugins;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Fixtures.Core.Plugins.Queries.GetPlugins;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetPluginsQuery"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPluginsQueryFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a <see cref="GetPluginsQuery"/>.
|
||||
/// </summary>
|
||||
/// <returns>The created <see cref="GetPluginsQuery"/>.</returns>
|
||||
public GetPluginsQuery Create()
|
||||
{
|
||||
return new GetPluginsQuery();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetPluginsQuery"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetPluginsQuery> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user