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,59 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Requests.Authentication;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
/// <summary>
/// Fixture class for the <see cref="ChangePasswordRequest"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class ChangePasswordRequestFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="ChangePasswordRequest"/>.
/// </summary>
/// <param name="username">Optional. The username for the password change.</param>
/// <param name="currentPassword">Optional. The current password.</param>
/// <param name="newPassword">Optional. The new password.</param>
/// <param name="newPasswordConfirm">Optional. The new password confirmation.</param>
/// <param name="includeUsername">Whether the username should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeCurrentPassword">Whether the current password should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeNewPassword">Whether the new password should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeNewPasswordConfirm">Whether the new password confirmation should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="ChangePasswordRequest"/>.</returns>
public ChangePasswordRequest Create(
string? username = null,
string? currentPassword = null,
string? newPassword = null,
string? newPasswordConfirm = null,
bool includeUsername = true,
bool includeCurrentPassword = true,
bool includeNewPassword = true,
bool includeNewPasswordConfirm = true)
{
string generatedNewPassword = newPassword ?? _faker.Internet.Password();
return new ChangePasswordRequest(
includeUsername ? (username ?? _faker.Internet.UserName()) : null,
includeCurrentPassword ? (currentPassword ?? _faker.Internet.Password()) : null,
includeNewPassword ? generatedNewPassword : null,
includeNewPasswordConfirm ? (newPasswordConfirm ?? generatedNewPassword) : null
);
}
/// <summary>
/// Creates a list of <see cref="ChangePasswordRequest"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<ChangePasswordRequest> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,53 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Requests.Authentication;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
/// <summary>
/// Fixture class for the <see cref="LoginRequest"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class LoginRequestFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="LoginRequest"/>.
/// </summary>
/// <param name="username">Optional. The username for login.</param>
/// <param name="password">Optional. The password for login.</param>
/// <param name="totpCode">Optional. The TOTP code for two-factor authentication.</param>
/// <param name="includeUsername">Whether the username should be included, or forced to <see langword="null"/>.</param>
/// <param name="includePassword">Whether the password should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeTotpCode">Whether the TOTP code should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="LoginRequest"/>.</returns>
public LoginRequest Create(
string? username = null,
string? password = null,
string? totpCode = null,
bool includeUsername = true,
bool includePassword = true,
bool includeTotpCode = true)
{
return new LoginRequest(
includeUsername ? (username ?? _faker.Internet.UserName()) : null,
includePassword ? (password ?? _faker.Internet.Password()) : null,
includeTotpCode ? (totpCode ?? _faker.Random.Number(100000, 999999).ToString()) : null
);
}
/// <summary>
/// Creates a list of <see cref="LoginRequest"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<LoginRequest> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,48 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Requests.Authentication;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
/// <summary>
/// Fixture class for the <see cref="RecoverPasswordRequest"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class RecoverPasswordRequestFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="RecoverPasswordRequest"/>.
/// </summary>
/// <param name="username">Optional. The username for password recovery.</param>
/// <param name="totpCode">Optional. The TOTP code for verification.</param>
/// <param name="includeUsername">Whether the username should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeTotpCode">Whether the TOTP code should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="RecoverPasswordRequest"/>.</returns>
public RecoverPasswordRequest Create(
string? username = null,
string? totpCode = null,
bool includeUsername = true,
bool includeTotpCode = true)
{
return new RecoverPasswordRequest(
includeUsername ? (username ?? _faker.Internet.UserName()) : null,
includeTotpCode ? (totpCode ?? _faker.Random.Number(100000, 999999).ToString()) : null
);
}
/// <summary>
/// Creates a list of <see cref="RecoverPasswordRequest"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<RecoverPasswordRequest> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -0,0 +1,57 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.Requests.Authentication;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
/// <summary>
/// Fixture class for the <see cref="RegistrationRequest"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class RegistrationRequestFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a random valid <see cref="RegistrationRequest"/>.
/// </summary>
/// <param name="username">Optional. The username for registration.</param>
/// <param name="password">Optional. The password for registration.</param>
/// <param name="passwordConfirm">Optional. The password confirmation.</param>
/// <param name="use2fa">Optional. Whether to use two-factor authentication.</param>
/// <param name="includeUsername">Whether the username should be included, or forced to <see langword="null"/>.</param>
/// <param name="includePassword">Whether the password should be included, or forced to <see langword="null"/>.</param>
/// <param name="includePasswordConfirm">Whether the password confirmation should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="RegistrationRequest"/>.</returns>
public RegistrationRequest Create(
string? username = null,
string? password = null,
string? passwordConfirm = null,
bool? use2fa = null,
bool includeUsername = true,
bool includePassword = true,
bool includePasswordConfirm = true)
{
string generatedPassword = password ?? _faker.Internet.Password();
return new RegistrationRequest(
includeUsername ? (username ?? _faker.Internet.UserName()) : null,
includePassword ? generatedPassword : null,
includePasswordConfirm ? (passwordConfirm ?? generatedPassword) : null,
use2fa ?? _faker.Random.Bool()
);
}
/// <summary>
/// Creates a list of <see cref="RegistrationRequest"/>.
/// </summary>
/// <param name="count">The number of elements to create.</param>
/// <returns>The created list.</returns>
public List<RegistrationRequest> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}