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

@@ -25,7 +25,7 @@ public class ChangePasswordEndpointTests : IClassFixture<LuminaApiFactory>, IDis
{
private readonly LuminaApiFactory _apiFactory;
private readonly HttpClient _client;
private readonly PasswordHashService _hashService;
private readonly PasswordHashService _hashService = new();
private readonly string _testUsername;
private readonly JsonSerializerOptions _jsonOptions = new()
{
@@ -42,7 +42,6 @@ public class ChangePasswordEndpointTests : IClassFixture<LuminaApiFactory>, IDis
_client = apiFactory.CreateClient();
_client.DefaultRequestHeaders.Clear();
_client.DefaultRequestHeaders.Add("X-Forwarded-For", $"192.168.1.12");
_hashService = new PasswordHashService();
_testUsername = $"testuser_{Guid.NewGuid()}";
}
@@ -26,9 +26,9 @@ namespace Lumina.Presentation.Api.SecurityTests.Core.Endpoints.UsersManagement.A
[ExcludeFromCodeCoverage]
public class LoginEndpointTests : IClassFixture<LuminaApiFactory>, IDisposable
{
private readonly PasswordHashService _hashService;
private readonly PasswordHashService _hashService = new();
private readonly ICryptographyService _cryptographyService;
private readonly TotpTokenGenerator _totpTokenGenerator;
private readonly TotpTokenGenerator _totpTokenGenerator = new();
private readonly LuminaApiFactory _apiFactory;
private readonly HttpClient _client;
private readonly JsonSerializerOptions _jsonOptions = new()
@@ -49,8 +49,6 @@ public class LoginEndpointTests : IClassFixture<LuminaApiFactory>, IDisposable
// set a fake IP for this test instance
_client.DefaultRequestHeaders.Clear();
_client.DefaultRequestHeaders.Add("X-Forwarded-For", $"192.168.1.1");
_hashService = new PasswordHashService();
_totpTokenGenerator = new TotpTokenGenerator();
_testUsername = $"testuser_{Guid.NewGuid()}";
using IServiceScope scope = apiFactory.Services.CreateScope();
@@ -22,7 +22,7 @@ namespace Lumina.Presentation.Api.SecurityTests.Core.Endpoints.UsersManagement.A
[ExcludeFromCodeCoverage]
public class RegisterEndpointTests : IClassFixture<LuminaApiFactory>, IDisposable
{
private readonly PasswordHashService _hashService;
private readonly PasswordHashService _hashService = new();
private readonly LuminaApiFactory _apiFactory;
private readonly HttpClient _client;
private readonly JsonSerializerOptions _jsonOptions = new()
@@ -38,7 +38,6 @@ public class RegisterEndpointTests : IClassFixture<LuminaApiFactory>, IDisposabl
_client = apiFactory.CreateClient();
_client.DefaultRequestHeaders.Clear();
_client.DefaultRequestHeaders.Add("X-Forwarded-For", $"192.168.1.5");
_hashService = new PasswordHashService();
_testUsername = $"testuser_{Guid.NewGuid()}";
}