Inlines fixtures instantiation.

This commit is contained in:
BinaryAlley committed 2026-08-15 03:19:51 -07:00
1 parent b648e2f054
commit 59e16d645a
147 files changed
+190 -898

No files matched your search

@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authentication.Comma
[ExcludeFromCodeCoverage]
public class ChangePasswordCommandValidatorTests
{
private readonly ChangePasswordCommandValidator _validator;
private readonly ChangePasswordCommandFixture _changePasswordCommandFixture;
/// <summary>
/// Initializes a new instance of the <see cref="ChangePasswordCommandValidatorTests"/> class.
/// </summary>
public ChangePasswordCommandValidatorTests()
{
_validator = new ChangePasswordCommandValidator();
_changePasswordCommandFixture = new ChangePasswordCommandFixture();
}
private readonly ChangePasswordCommandValidator _validator = new();
private readonly ChangePasswordCommandFixture _changePasswordCommandFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authentication.Comma
[ExcludeFromCodeCoverage]
public class RecoverPasswordCommandValidatorTests
{
private readonly RecoverPasswordCommandValidator _validator;
private readonly RecoverPasswordCommandFixture _recoverPasswordCommandFixture;
/// <summary>
/// Initializes a new instance of the <see cref="RecoverPasswordCommandValidatorTests"/> class.
/// </summary>
public RecoverPasswordCommandValidatorTests()
{
_validator = new RecoverPasswordCommandValidator();
_recoverPasswordCommandFixture = new RecoverPasswordCommandFixture();
}
private readonly RecoverPasswordCommandValidator _validator = new();
private readonly RecoverPasswordCommandFixture _recoverPasswordCommandFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authentication.Comma
[ExcludeFromCodeCoverage]
public class RegisterUserCommandValidatorTests
{
private readonly RegisterUserCommandValidator _validator;
private readonly RegisterUserCommandFixture _registerUserCommandFixture;
/// <summary>
/// Initializes a new instance of the <see cref="RegisterUserCommandValidatorTests"/> class.
/// </summary>
public RegisterUserCommandValidatorTests()
{
_validator = new RegisterUserCommandValidator();
_registerUserCommandFixture = new RegisterUserCommandFixture();
}
private readonly RegisterUserCommandValidator _validator = new();
private readonly RegisterUserCommandFixture _registerUserCommandFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()
@@ -33,7 +33,7 @@ public class GetUsersQueryHandlerTests
private readonly IUserRepository _mockUserRepository;
private readonly GetUsersQueryHandler _sut;
private readonly UserEntityFixture _userEntityFixture = new();
private readonly GetUsersQueryFixture _getUsersQueryFixture;
private readonly GetUsersQueryFixture _getUsersQueryFixture = new();
private readonly Guid _userId;
/// <summary>
@@ -45,7 +45,6 @@ public class GetUsersQueryHandlerTests
_mockAuthorizationService = Substitute.For<IAuthorizationService>();
_mockCurrentUserService = Substitute.For<ICurrentUserService>();
_mockUserRepository = Substitute.For<IUserRepository>();
_getUsersQueryFixture = new GetUsersQueryFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authentication.Queri
[ExcludeFromCodeCoverage]
public class LoginUserQueryValidatorTests
{
private readonly LoginUserQueryValidator _validator;
private readonly LoginUserQueryFixture _loginUserQueryFixture;
/// <summary>
/// Initializes a new instance of the <see cref="LoginUserQueryValidatorTests"/> class.
/// </summary>
public LoginUserQueryValidatorTests()
{
_validator = new LoginUserQueryValidator();
_loginUserQueryFixture = new LoginUserQueryFixture();
}
private readonly LoginUserQueryValidator _validator = new();
private readonly LoginUserQueryFixture _loginUserQueryFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()