mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15:11:10 +00:00
Inlines fixtures instantiation.
This commit is contained in:
1 parent
b648e2f054
commit
59e16d645a
147 files changed
+190
-898
No files matched your search
+2
-4
@@ -32,9 +32,9 @@ public class LoginEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>,
|
||||
{
|
||||
private HttpClient _client;
|
||||
private readonly AuthenticatedLuminaApiFactory _apiFactory;
|
||||
private readonly PasswordHashService _hashService;
|
||||
private readonly PasswordHashService _hashService = new();
|
||||
private readonly ICryptographyService _cryptographyService;
|
||||
private readonly TotpTokenGenerator _totpTokenGenerator;
|
||||
private readonly TotpTokenGenerator _totpTokenGenerator = new();
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
PropertyNameCaseInsensitive = true,
|
||||
@@ -50,8 +50,6 @@ public class LoginEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>,
|
||||
{
|
||||
_client = apiFactory.CreateClient();
|
||||
_apiFactory = apiFactory;
|
||||
_hashService = new PasswordHashService();
|
||||
_totpTokenGenerator = new TotpTokenGenerator();
|
||||
_testUsername = $"testuser_{Guid.NewGuid()}";
|
||||
|
||||
using IServiceScope scope = apiFactory.Services.CreateScope();
|
||||
|
||||
+2
-4
@@ -34,9 +34,9 @@ public class RecoverPasswordEndpointTests : IClassFixture<AuthenticatedLuminaApi
|
||||
{
|
||||
private HttpClient _client;
|
||||
private readonly AuthenticatedLuminaApiFactory _apiFactory;
|
||||
private readonly PasswordHashService _hashService;
|
||||
private readonly PasswordHashService _hashService = new();
|
||||
private readonly ICryptographyService _cryptographyService;
|
||||
private readonly TotpTokenGenerator _totpTokenGenerator;
|
||||
private readonly TotpTokenGenerator _totpTokenGenerator = new();
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
PropertyNameCaseInsensitive = true,
|
||||
@@ -52,8 +52,6 @@ public class RecoverPasswordEndpointTests : IClassFixture<AuthenticatedLuminaApi
|
||||
{
|
||||
_client = apiFactory.CreateClient();
|
||||
_apiFactory = apiFactory;
|
||||
_hashService = new PasswordHashService();
|
||||
_totpTokenGenerator = new TotpTokenGenerator();
|
||||
_testUsername = $"testuser_{Guid.NewGuid()}";
|
||||
|
||||
// get the encryption service with the test key from factory
|
||||
|
||||
+1
-2
@@ -39,7 +39,7 @@ public class AddBookEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>
|
||||
new BookJsonConverter()
|
||||
}
|
||||
};
|
||||
private readonly AddBookRequestFixture _requestBookFixture;
|
||||
private readonly AddBookRequestFixture _requestBookFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AddBookEndpointTests"/> class.
|
||||
@@ -49,7 +49,6 @@ public class AddBookEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>
|
||||
{
|
||||
_client = apiFactory.CreateClient();
|
||||
_apiFactory = apiFactory;
|
||||
_requestBookFixture = new AddBookRequestFixture();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user