mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 19:21: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
+39
@@ -0,0 +1,39 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Contracts.Responses.Authentication;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Fixtures.Core.Responses.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="ChangePasswordResponse"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ChangePasswordResponseFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="ChangePasswordResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="isPasswordChanged">Optional. Whether the password was changed.</param>
|
||||
/// <returns>The created <see cref="ChangePasswordResponse"/>.</returns>
|
||||
public ChangePasswordResponse Create(
|
||||
bool? isPasswordChanged = null)
|
||||
{
|
||||
return new ChangePasswordResponse(isPasswordChanged ?? _faker.Random.Bool());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="ChangePasswordResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<ChangePasswordResponse> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Contracts.Responses.Authentication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Fixtures.Core.Responses.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="LoginResponse"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class LoginResponseFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="LoginResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="id">Optional. The Id of the authenticated user.</param>
|
||||
/// <param name="username">Optional. The username of the authenticated user.</param>
|
||||
/// <param name="token">Optional. The authentication token of the user.</param>
|
||||
/// <param name="usesTotp">Optional. Whether the user uses two-factor authentication.</param>
|
||||
/// <returns>The created <see cref="LoginResponse"/>.</returns>
|
||||
public LoginResponse Create(
|
||||
Guid? id = null,
|
||||
string? username = null,
|
||||
string? token = null,
|
||||
bool? usesTotp = null)
|
||||
{
|
||||
return new LoginResponse(
|
||||
id ?? Guid.NewGuid(),
|
||||
username ?? _faker.Internet.UserName(),
|
||||
token ?? _faker.Random.Hexadecimal(32),
|
||||
usesTotp ?? _faker.Random.Bool());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="LoginResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<LoginResponse> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Contracts.Responses.Authentication;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Fixtures.Core.Responses.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="RecoverPasswordResponse"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RecoverPasswordResponseFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="RecoverPasswordResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="isPasswordReset">Optional. Whether the password was reset.</param>
|
||||
/// <returns>The created <see cref="RecoverPasswordResponse"/>.</returns>
|
||||
public RecoverPasswordResponse Create(
|
||||
bool? isPasswordReset = null)
|
||||
{
|
||||
return new RecoverPasswordResponse(isPasswordReset ?? _faker.Random.Bool());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="RecoverPasswordResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<RecoverPasswordResponse> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Contracts.Responses.Authentication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Fixtures.Core.Responses.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="RegistrationResponse"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RegistrationResponseFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="RegistrationResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="id">Optional. The Id of the registered user.</param>
|
||||
/// <param name="username">Optional. The username of the registered user.</param>
|
||||
/// <param name="totpSecret">Optional. The TOTP secret used for two-factor authentication.</param>
|
||||
/// <returns>The created <see cref="RegistrationResponse"/>.</returns>
|
||||
public RegistrationResponse Create(
|
||||
Guid? id = null,
|
||||
string? username = null,
|
||||
string? totpSecret = null)
|
||||
{
|
||||
return new RegistrationResponse(
|
||||
id ?? Guid.NewGuid(),
|
||||
username ?? _faker.Internet.UserName(),
|
||||
totpSecret ?? _faker.Random.AlphaNumeric(16)
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="RegistrationResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<RegistrationResponse> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user