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
+46
@@ -0,0 +1,46 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Contracts.DTO.Authentication;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Authorization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Fixtures.Core.DTO.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="PermissionDto"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PermissionDtoFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="PermissionDto"/>.
|
||||
/// </summary>
|
||||
/// <param name="id">Optional. The Id of the permission.</param>
|
||||
/// <param name="permissionName">Optional. The name of the permission.</param>
|
||||
/// <returns>The created <see cref="PermissionDto"/>.</returns>
|
||||
public PermissionDto Create(
|
||||
Guid? id = null,
|
||||
AuthorizationPermission? permissionName = null)
|
||||
{
|
||||
return new PermissionDto(
|
||||
id ?? Guid.NewGuid(),
|
||||
permissionName ?? _faker.PickRandom<AuthorizationPermission>()
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="PermissionDto"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<PermissionDto> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Contracts.DTO.Authentication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Fixtures.Core.DTO.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="RoleDto"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RoleDtoFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="RoleDto"/>.
|
||||
/// </summary>
|
||||
/// <param name="id">Optional. The unique identifier of the role.</param>
|
||||
/// <param name="roleName">Optional. The name of the role.</param>
|
||||
/// <returns>The created <see cref="RoleDto"/>.</returns>
|
||||
public RoleDto Create(
|
||||
Guid? id = null,
|
||||
string? roleName = null)
|
||||
{
|
||||
return new RoleDto(
|
||||
id ?? Guid.NewGuid(),
|
||||
roleName ?? _faker.Lorem.Word());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="RoleDto"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<RoleDto> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user