diff --git a/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/Authorization/RolePermissionEntityFixture.cs b/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/Authorization/RolePermissionEntityFixture.cs
index e1531760..3270b06f 100644
--- a/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/Authorization/RolePermissionEntityFixture.cs
+++ b/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/Authorization/RolePermissionEntityFixture.cs
@@ -15,15 +15,7 @@ namespace Lumina.Application.Fixtures.Common.DataAccess.Entities.Authorization;
[ExcludeFromCodeCoverage]
public class RolePermissionEntityFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RolePermissionEntityFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookEntityFixture.cs b/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookEntityFixture.cs
index 1bdf6067..3e5f2b6d 100644
--- a/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookEntityFixture.cs
+++ b/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookEntityFixture.cs
@@ -18,15 +18,7 @@ namespace Lumina.Application.Fixtures.Common.DataAccess.Entities.MediaLibrary.Wr
public class BookEntityFixture
{
private readonly Random _random = new();
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BookEntityFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookRatingEntityFixture.cs b/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookRatingEntityFixture.cs
index 9c6b1f32..e06ad74d 100644
--- a/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookRatingEntityFixture.cs
+++ b/tests/Common/Lumina.Application.Fixtures/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookRatingEntityFixture.cs
@@ -17,15 +17,7 @@ namespace Lumina.Application.Fixtures.Common.DataAccess.Entities.MediaLibrary.Wr
public class BookRatingEntityFixture
{
private readonly Random _random = new();
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BookRatingEntityFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a .
diff --git a/tests/Common/Lumina.Application.Fixtures/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandFixture.cs b/tests/Common/Lumina.Application.Fixtures/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandFixture.cs
index b07884dc..217d5283 100644
--- a/tests/Common/Lumina.Application.Fixtures/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandFixture.cs
+++ b/tests/Common/Lumina.Application.Fixtures/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandFixture.cs
@@ -21,19 +21,17 @@ namespace Lumina.Application.Fixtures.Core.MediaLibrary.WrittenContentLibrary.Bo
[ExcludeFromCodeCoverage]
public class AddBookCommandFixture
{
- private readonly Fixture _fixture;
+ private readonly Fixture _fixture = new();
private readonly Random _random = new();
- private readonly Faker _faker;
+ private readonly Faker _faker = new();
///
/// Initializes a new instance of the class.
///
public AddBookCommandFixture()
{
- _fixture = new Fixture();
_fixture.Customizations.Add(new DateOnlySpecimenBuilder());
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
- _faker = new Faker();
}
///
diff --git a/tests/Common/Lumina.Contracts.Fixtures/Core/DTO/MediaLibrary/WrittenContentLibrary/BookLibrary/BookRatingDtoFixture.cs b/tests/Common/Lumina.Contracts.Fixtures/Core/DTO/MediaLibrary/WrittenContentLibrary/BookLibrary/BookRatingDtoFixture.cs
index b6ea76ce..4b6c7cec 100644
--- a/tests/Common/Lumina.Contracts.Fixtures/Core/DTO/MediaLibrary/WrittenContentLibrary/BookLibrary/BookRatingDtoFixture.cs
+++ b/tests/Common/Lumina.Contracts.Fixtures/Core/DTO/MediaLibrary/WrittenContentLibrary/BookLibrary/BookRatingDtoFixture.cs
@@ -16,17 +16,9 @@ namespace Lumina.Contracts.Fixtures.Core.DTO.MediaLibrary.WrittenContentLibrary.
[ExcludeFromCodeCoverage]
public class BookRatingDtoFixture
{
- private readonly Fixture _fixture;
+ private readonly Fixture _fixture = new();
private readonly Random _random = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public BookRatingDtoFixture()
- {
- _fixture = new Fixture();
- }
-
///
/// Creates a .
///
diff --git a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/ChangePasswordRequestFixture.cs b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/ChangePasswordRequestFixture.cs
index c43e221a..120b648d 100644
--- a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/ChangePasswordRequestFixture.cs
+++ b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/ChangePasswordRequestFixture.cs
@@ -14,15 +14,7 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
[ExcludeFromCodeCoverage]
public class ChangePasswordRequestFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ChangePasswordRequestFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/LoginRequestFixture.cs b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/LoginRequestFixture.cs
index d9687475..77ffd8d7 100644
--- a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/LoginRequestFixture.cs
+++ b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/LoginRequestFixture.cs
@@ -14,15 +14,7 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
[ExcludeFromCodeCoverage]
public class LoginRequestFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public LoginRequestFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/RecoverPasswordRequestFixture.cs b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/RecoverPasswordRequestFixture.cs
index bcfba58b..1e0a8fac 100644
--- a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/RecoverPasswordRequestFixture.cs
+++ b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/RecoverPasswordRequestFixture.cs
@@ -14,15 +14,7 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
[ExcludeFromCodeCoverage]
public class RecoverPasswordRequestFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RecoverPasswordRequestFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/RegistrationRequestFixture.cs b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/RegistrationRequestFixture.cs
index 2fa82b4d..d0a620ff 100644
--- a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/RegistrationRequestFixture.cs
+++ b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/Authentication/RegistrationRequestFixture.cs
@@ -14,15 +14,7 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
[ExcludeFromCodeCoverage]
public class RegistrationRequestFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RegistrationRequestFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequestFixture.cs b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequestFixture.cs
index 6bb1b69f..c8f5ad7d 100644
--- a/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequestFixture.cs
+++ b/tests/Common/Lumina.Contracts.Fixtures/Core/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequestFixture.cs
@@ -21,19 +21,17 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.MediaLibrary.WrittenContentLib
[ExcludeFromCodeCoverage]
public class AddBookRequestFixture
{
- private readonly Fixture _fixture;
+ private readonly Fixture _fixture = new();
private readonly Random _random = new();
- private readonly Faker _faker;
+ private readonly Faker _faker = new();
///
/// Initializes a new instance of the class.
///
public AddBookRequestFixture()
{
- _fixture = new Fixture();
_fixture.Customizations.Add(new DateOnlySpecimenBuilder());
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
- _faker = new Faker();
}
///
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/DirectoryFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/DirectoryFixture.cs
index 10efb1fa..a69d050d 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/DirectoryFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/DirectoryFixture.cs
@@ -18,15 +18,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
[ExcludeFromCodeCoverage]
public class DirectoryFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public DirectoryFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/FileFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/FileFixture.cs
index 44105387..5e730d0d 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/FileFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/FileFixture.cs
@@ -17,15 +17,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
[ExcludeFromCodeCoverage]
public class FileFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FileFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/FileSystemPathIdFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/FileSystemPathIdFixture.cs
index e2acce51..aa71867a 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/FileSystemPathIdFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/FileSystemPathIdFixture.cs
@@ -16,15 +16,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
[ExcludeFromCodeCoverage]
public class FileSystemPathIdFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FileSystemPathIdFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/PathSegmentFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/PathSegmentFixture.cs
index b2bd4a1c..e73fbb2d 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/PathSegmentFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/PathSegmentFixture.cs
@@ -16,15 +16,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
[ExcludeFromCodeCoverage]
public class PathSegmentFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public PathSegmentFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/StreamInfoFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/StreamInfoFixture.cs
index f7ffb31b..f66a9d6e 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/StreamInfoFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/StreamInfoFixture.cs
@@ -16,15 +16,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
[ExcludeFromCodeCoverage]
public class StreamInfoFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public StreamInfoFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/ThumbnailFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/ThumbnailFixture.cs
index 1a4e15f2..a2fcbb2b 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/ThumbnailFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/ValueObjects/ThumbnailFixture.cs
@@ -15,15 +15,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
[ExcludeFromCodeCoverage]
public class ThumbnailFixture
{
- private readonly Faker _faker;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ThumbnailFixture()
- {
- _faker = new Faker();
- }
+ private readonly Faker _faker = new();
///
/// Creates a random valid .
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/LibraryManagementBoundedContext/LibraryAggregate/LibraryFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/LibraryManagementBoundedContext/LibraryAggregate/LibraryFixture.cs
index f097e9c8..b9ab4b10 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/LibraryManagementBoundedContext/LibraryAggregate/LibraryFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/LibraryManagementBoundedContext/LibraryAggregate/LibraryFixture.cs
@@ -20,17 +20,9 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.LibraryManagementBoundedCo
[ExcludeFromCodeCoverage]
public class LibraryFixture
{
- private readonly Faker _faker;
+ private readonly Faker _faker = new();
private readonly Random _random = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public LibraryFixture()
- {
- _faker = new Faker();
- }
-
///
/// Creates a random valid domain aggregate.
///
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/BookFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/BookFixture.cs
index 32dd5033..19f28754 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/BookFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/BookFixture.cs
@@ -24,20 +24,17 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.WrittenContentLibraryBound
[ExcludeFromCodeCoverage]
public class BookFixture
{
- private readonly Fixture _fixture;
- private readonly IsbnFixture _isbnFixture;
- private readonly BookRatingFixture _bookRatingFixture;
+ private readonly Fixture _fixture = new();
+ private readonly IsbnFixture _isbnFixture = new();
+ private readonly BookRatingFixture _bookRatingFixture = new();
///
/// Initializes a new instance of the class.
///
public BookFixture()
{
- _fixture = new Fixture();
_fixture.Customizations.Add(new DateOnlySpecimenBuilder());
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
- _isbnFixture = new IsbnFixture();
- _bookRatingFixture = new BookRatingFixture();
ConfigureCustomDomainTypes();
}
diff --git a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/ValueObjects/BookRatingFixture.cs b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/ValueObjects/BookRatingFixture.cs
index 3490f321..0305ecd6 100644
--- a/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/ValueObjects/BookRatingFixture.cs
+++ b/tests/Common/Lumina.Domain.Fixtures/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/ValueObjects/BookRatingFixture.cs
@@ -16,17 +16,9 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.WrittenContentLibraryBound
[ExcludeFromCodeCoverage]
public class BookRatingFixture
{
- private readonly Fixture _fixture;
+ private readonly Fixture _fixture = new();
private readonly Random _random = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public BookRatingFixture()
- {
- _fixture = new Fixture();
- }
-
///
/// Creates a random valid .
///
diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/AuthenticatedLuminaApiFactory.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/AuthenticatedLuminaApiFactory.cs
index e85e1420..bd119684 100644
--- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/AuthenticatedLuminaApiFactory.cs
+++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Common/Setup/AuthenticatedLuminaApiFactory.cs
@@ -25,7 +25,7 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup;
[ExcludeFromCodeCoverage]
public class AuthenticatedLuminaApiFactory : LuminaApiFactory, IDisposable
{
- private readonly PasswordHashService _hashService;
+ private readonly PasswordHashService _hashService = new();
private readonly JsonSerializerOptions _jsonOptions = new()
{
PropertyNameCaseInsensitive = true
@@ -36,14 +36,6 @@ public class AuthenticatedLuminaApiFactory : LuminaApiFactory, IDisposable
///
public string? TestUsername { get; private set; }
- ///
- /// Initializes a new instance of the class.
- ///
- public AuthenticatedLuminaApiFactory()
- {
- _hashService = new PasswordHashService();
- }
-
///
/// Creates an HTTP client with authentication headers and a test user
///
diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Endpoints/UsersManagement/Authentication/LoginEndpointTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Endpoints/UsersManagement/Authentication/LoginEndpointTests.cs
index 17bdafb7..8d823f75 100644
--- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Endpoints/UsersManagement/Authentication/LoginEndpointTests.cs
+++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Endpoints/UsersManagement/Authentication/LoginEndpointTests.cs
@@ -32,9 +32,9 @@ public class LoginEndpointTests : IClassFixture,
{
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,
{
_client = apiFactory.CreateClient();
_apiFactory = apiFactory;
- _hashService = new PasswordHashService();
- _totpTokenGenerator = new TotpTokenGenerator();
_testUsername = $"testuser_{Guid.NewGuid()}";
using IServiceScope scope = apiFactory.Services.CreateScope();
diff --git a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Endpoints/UsersManagement/Authentication/RecoverPasswordEndpointTests.cs b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Endpoints/UsersManagement/Authentication/RecoverPasswordEndpointTests.cs
index 3867d841..7c20b5be 100644
--- a/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Endpoints/UsersManagement/Authentication/RecoverPasswordEndpointTests.cs
+++ b/tests/IntegrationTests/Lumina.Presentation.Api.IntegrationTests/Core/Endpoints/UsersManagement/Authentication/RecoverPasswordEndpointTests.cs
@@ -34,9 +34,9 @@ public class RecoverPasswordEndpointTests : IClassFixture
new BookJsonConverter()
}
};
- private readonly AddBookRequestFixture _requestBookFixture;
+ private readonly AddBookRequestFixture _requestBookFixture = new();
///
/// Initializes a new instance of the class.
@@ -49,7 +49,6 @@ public class AddBookEndpointTests : IClassFixture
{
_client = apiFactory.CreateClient();
_apiFactory = apiFactory;
- _requestBookFixture = new AddBookRequestFixture();
}
///
diff --git a/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/ChangePasswordEndpointTests.cs b/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/ChangePasswordEndpointTests.cs
index 57c424fa..bca24809 100644
--- a/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/ChangePasswordEndpointTests.cs
+++ b/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/ChangePasswordEndpointTests.cs
@@ -25,7 +25,7 @@ public class ChangePasswordEndpointTests : IClassFixture, 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, IDis
_client = apiFactory.CreateClient();
_client.DefaultRequestHeaders.Clear();
_client.DefaultRequestHeaders.Add("X-Forwarded-For", $"192.168.1.12");
- _hashService = new PasswordHashService();
_testUsername = $"testuser_{Guid.NewGuid()}";
}
diff --git a/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/LoginEndpointTests.cs b/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/LoginEndpointTests.cs
index d7be4d45..7de0433e 100644
--- a/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/LoginEndpointTests.cs
+++ b/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/LoginEndpointTests.cs
@@ -26,9 +26,9 @@ namespace Lumina.Presentation.Api.SecurityTests.Core.Endpoints.UsersManagement.A
[ExcludeFromCodeCoverage]
public class LoginEndpointTests : IClassFixture, 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, 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();
diff --git a/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/RegisterEndpointTests.cs b/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/RegisterEndpointTests.cs
index 40d63a07..7222650d 100644
--- a/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/RegisterEndpointTests.cs
+++ b/tests/SecurityTests/Lumina.Presentation.Api.SecurityTests/Core/Endpoints/UsersManagement/Authentication/RegisterEndpointTests.cs
@@ -22,7 +22,7 @@ namespace Lumina.Presentation.Api.SecurityTests.Core.Endpoints.UsersManagement.A
[ExcludeFromCodeCoverage]
public class RegisterEndpointTests : IClassFixture, 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, IDisposabl
_client = apiFactory.CreateClient();
_client.DefaultRequestHeaders.Clear();
_client.DefaultRequestHeaders.Add("X-Forwarded-For", $"192.168.1.5");
- _hashService = new PasswordHashService();
_testUsername = $"testuser_{Guid.NewGuid()}";
}
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/ChangePasswordRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/ChangePasswordRequestMappingTests.cs
index 4a6be2ba..5d0544b9 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/ChangePasswordRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/ChangePasswordRequestMappingTests.cs
@@ -14,15 +14,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.Authentication;
[ExcludeFromCodeCoverage]
public class ChangePasswordRequestMappingTests
{
- private readonly ChangePasswordRequestFixture _fixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ChangePasswordRequestMappingTests()
- {
- _fixture = new();
- }
+ private readonly ChangePasswordRequestFixture _fixture = new();
[Fact]
public void ToCommand_WhenMappingRequest_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/LoginRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/LoginRequestMappingTests.cs
index 0c14a345..5e2a7705 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/LoginRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/LoginRequestMappingTests.cs
@@ -14,15 +14,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.Authentication;
[ExcludeFromCodeCoverage]
public class LoginRequestMappingTests
{
- private readonly LoginRequestFixture _fixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public LoginRequestMappingTests()
- {
- _fixture = new();
- }
+ private readonly LoginRequestFixture _fixture = new();
[Fact]
public void ToQuery_WhenMappingRequest_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/RecoverPasswordRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/RecoverPasswordRequestMappingTests.cs
index ef6e2635..2191d1eb 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/RecoverPasswordRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/RecoverPasswordRequestMappingTests.cs
@@ -14,15 +14,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.Authentication;
[ExcludeFromCodeCoverage]
public class RecoverPasswordRequestMappingTests
{
- private readonly RecoverPasswordRequestFixture _fixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RecoverPasswordRequestMappingTests()
- {
- _fixture = new();
- }
+ private readonly RecoverPasswordRequestFixture _fixture = new();
[Fact]
public void ToCommand_WhenMappingRequest_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/RegistrationRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/RegistrationRequestMappingTests.cs
index 6fc9a94d..414607f3 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/RegistrationRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/Authentication/RegistrationRequestMappingTests.cs
@@ -15,15 +15,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.Authentication;
[ExcludeFromCodeCoverage]
public class RegistrationRequestMappingTests
{
- private readonly RegistrationRequestFixture _fixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RegistrationRequestMappingTests()
- {
- _fixture = new();
- }
+ private readonly RegistrationRequestFixture _fixture = new();
[Fact]
public void ToSetupCommand_WhenMappingRequest_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Common/FileSystemTreeNodeResponseMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Common/FileSystemTreeNodeResponseMappingTests.cs
index 22983c41..a4cf2112 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Common/FileSystemTreeNodeResponseMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Common/FileSystemTreeNodeResponseMappingTests.cs
@@ -16,15 +16,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileSystemManagement.Commo
[ExcludeFromCodeCoverage]
public class FileSystemTreeNodeResponseMappingTests
{
- private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FileSystemTreeNodeResponseMappingTests()
- {
- _fileSystemTreeNodeResponseFixture = new();
- }
+ private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture = new();
[Fact]
public void ToWindowsRootItem_WhenMappingFileSystemTreeNodeResponse_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Directories/DirectoryMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Directories/DirectoryMappingTests.cs
index 749523d8..64c87103 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Directories/DirectoryMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Directories/DirectoryMappingTests.cs
@@ -18,15 +18,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileSystemManagement.Direc
[ExcludeFromCodeCoverage]
public class DirectoryMappingTests
{
- private readonly DirectoryFixture _directoryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public DirectoryMappingTests()
- {
- _directoryFixture = new DirectoryFixture();
- }
+ private readonly DirectoryFixture _directoryFixture = new();
[Fact]
public void ToFileSystemTreeNodeResponse_WhenMappingDirectory_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/FileSystem/FileSystemItemMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/FileSystem/FileSystemItemMappingTests.cs
index 211e07b6..89032fd7 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/FileSystem/FileSystemItemMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/FileSystem/FileSystemItemMappingTests.cs
@@ -23,23 +23,11 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileSystemManagement.FileS
[ExcludeFromCodeCoverage]
public class FileSystemItemMappingTests
{
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
- private readonly DirectoryFixture _directoryFixture;
- private readonly FileFixture _fileFixture;
- private readonly WindowsRootItemFixture _windowsRootItemFixture;
- private readonly UnixRootItemFixture _unixRootItemFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FileSystemItemMappingTests()
- {
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
- _directoryFixture = new DirectoryFixture();
- _fileFixture = new FileFixture();
- _windowsRootItemFixture = new WindowsRootItemFixture();
- _unixRootItemFixture = new UnixRootItemFixture();
- }
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
+ private readonly DirectoryFixture _directoryFixture = new();
+ private readonly FileFixture _fileFixture = new();
+ private readonly WindowsRootItemFixture _windowsRootItemFixture = new();
+ private readonly UnixRootItemFixture _unixRootItemFixture = new();
[Fact]
public void ToFileSystemItemModel_WhenMappingFileSystemItem_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/FileMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/FileMappingTests.cs
index 314ad0c7..b6ba1e9d 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/FileMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/FileMappingTests.cs
@@ -18,15 +18,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileSystemManagement.Files
[ExcludeFromCodeCoverage]
public class FileMappingTests
{
- private readonly FileFixture _fileFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FileMappingTests()
- {
- _fileFixture = new();
- }
+ private readonly FileFixture _fileFixture = new();
[Fact]
public void ToFileSystemTreeNodeResponse_WhenMappingFile_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/GetFilesRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/GetFilesRequestMappingTests.cs
index 10000d86..aafecb2d 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/GetFilesRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/GetFilesRequestMappingTests.cs
@@ -16,13 +16,6 @@ public class GetFilesRequestMappingTests
{
private readonly GetFilesRequestFixture _getFilesRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public GetFilesRequestMappingTests()
- {
- }
-
[Fact]
public void ToQuery_WhenMappingGetFilesRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/GetTreeFilesRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/GetTreeFilesRequestMappingTests.cs
index 1632639e..41644ab7 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/GetTreeFilesRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Files/GetTreeFilesRequestMappingTests.cs
@@ -16,13 +16,6 @@ public class GetTreeFilesRequestMappingTests
{
private readonly GetTreeFilesRequestFixture _getTreeFilesRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public GetTreeFilesRequestMappingTests()
- {
- }
-
[Fact]
public void ToQuery_WhenMappingGetTreeFilesRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/CheckPathExistsRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/CheckPathExistsRequestMappingTests.cs
index c0527575..2ee1b6ab 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/CheckPathExistsRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/CheckPathExistsRequestMappingTests.cs
@@ -18,13 +18,6 @@ public class CheckPathExistsRequestMappingTests
{
private readonly CheckPathExistsRequestFixture _checkPathExistsRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public CheckPathExistsRequestMappingTests()
- {
- }
-
[Fact]
public void ToQuery_WhenMappingCheckPathExistsRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/CombinePathRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/CombinePathRequestMappingTests.cs
index fd6d5a59..7f8331db 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/CombinePathRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/CombinePathRequestMappingTests.cs
@@ -18,13 +18,6 @@ public class CombinePathRequestMappingTests
{
private readonly CombinePathRequestFixture _combinePathRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public CombinePathRequestMappingTests()
- {
- }
-
[Fact]
public void ToCommand_WhenMappingCombinePathRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/GetPathParentRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/GetPathParentRequestMappingTests.cs
index 13a16538..2ff9cf64 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/GetPathParentRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/GetPathParentRequestMappingTests.cs
@@ -18,13 +18,6 @@ public class GetPathParentRequestMappingTests
{
private readonly GetPathParentRequestFixture _getPathParentRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public GetPathParentRequestMappingTests()
- {
- }
-
[Fact]
public void ToQuery_WhenMappingGetPathParentRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/GetPathRootRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/GetPathRootRequestMappingTests.cs
index 95adb331..c771675e 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/GetPathRootRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/GetPathRootRequestMappingTests.cs
@@ -18,13 +18,6 @@ public class GetPathRootRequestMappingTests
{
private readonly GetPathRootRequestFixture _getPathRootRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public GetPathRootRequestMappingTests()
- {
- }
-
[Fact]
public void ToQuery_WhenMappingGetPathRootRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/SplitPathRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/SplitPathRequestMappingTests.cs
index 120e4586..64572d14 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/SplitPathRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/SplitPathRequestMappingTests.cs
@@ -18,13 +18,6 @@ public class SplitPathRequestMappingTests
{
private readonly SplitPathRequestFixture _splitPathRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public SplitPathRequestMappingTests()
- {
- }
-
[Fact]
public void ToCommand_WhenMappingSplitPathRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/ValidatePathRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/ValidatePathRequestMappingTests.cs
index e9d80061..d55ea39d 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/ValidatePathRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Paths/ValidatePathRequestMappingTests.cs
@@ -18,13 +18,6 @@ public class ValidatePathRequestMappingTests
{
private readonly ValidatePathRequestFixture _validatePathRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public ValidatePathRequestMappingTests()
- {
- }
-
[Fact]
public void ToQuery_WhenMappingValidatePathRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Thumbnails/GetThumbnailRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Thumbnails/GetThumbnailRequestMappingTests.cs
index c7665d5b..119e6166 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Thumbnails/GetThumbnailRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/FileSystemManagement/Thumbnails/GetThumbnailRequestMappingTests.cs
@@ -18,13 +18,6 @@ public class GetThumbnailRequestMappingTests
{
private readonly GetThumbnailRequestFixture _getThumbnailRequestFixture = new();
- ///
- /// Initializes a new instance of the class.
- ///
- public GetThumbnailRequestMappingTests()
- {
- }
-
[Fact]
public void ToQuery_WhenMappingGetThumbnailRequest_ShouldMapCorrectly()
{
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequestMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequestMappingTests.cs
index eb4dbc93..53f28f53 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequestMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequestMappingTests.cs
@@ -18,15 +18,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.MediaLibrary.WrittenConten
[ExcludeFromCodeCoverage]
public class AddBookRequestMappingTests
{
- private readonly AddBookRequestFixture _requestFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public AddBookRequestMappingTests()
- {
- _requestFixture = new AddBookRequestFixture();
- }
+ private readonly AddBookRequestFixture _requestFixture = new();
[Fact]
public void ToCommand_WhenMappingCompleteRequest_ShouldMapAllPropertiesCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookEntityMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookEntityMappingTests.cs
index 14a5d963..7dcbadc5 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookEntityMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookEntityMappingTests.cs
@@ -20,15 +20,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.MediaLibrary.WrittenConten
[ExcludeFromCodeCoverage]
public class BookEntityMappingTests
{
- private readonly BookEntityFixture _bookEntityFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BookEntityMappingTests()
- {
- _bookEntityFixture = new BookEntityFixture();
- }
+ private readonly BookEntityFixture _bookEntityFixture = new();
[Fact]
public void ToDomainEntity_WhenMappingValidBookEntity_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookMappingTests.cs
index df3a8163..315c7a11 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookMappingTests.cs
@@ -16,15 +16,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.MediaLibrary.WrittenConten
[ExcludeFromCodeCoverage]
public class BookMappingTests
{
- private readonly BookFixture _bookFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BookMappingTests()
- {
- _bookFixture = new BookFixture();
- }
+ private readonly BookFixture _bookFixture = new();
[Fact]
public void ToRepositoryEntity_WhenMappingCompleteBook_ShouldMapAllPropertiesCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingDtoMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingDtoMappingTests.cs
index 84724c5e..fe558119 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingDtoMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingDtoMappingTests.cs
@@ -18,15 +18,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.MediaLibrary.WrittenConten
[ExcludeFromCodeCoverage]
public class BookRatingDtoMappingTests
{
- private readonly BookRatingDtoFixture _bookRatingDtoFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BookRatingDtoMappingTests()
- {
- _bookRatingDtoFixture = new BookRatingDtoFixture();
- }
+ private readonly BookRatingDtoFixture _bookRatingDtoFixture = new();
[Fact]
public void ToDomainEntity_WhenMappingCompleteBookRatinDto_ShouldMapAllPropertiesCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingEntityMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingEntityMappingTests.cs
index 6a34a2c0..465a89eb 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingEntityMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingEntityMappingTests.cs
@@ -19,15 +19,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.MediaLibrary.WrittenConten
[ExcludeFromCodeCoverage]
public class BookRatingEntityMappingTests
{
- private readonly BookRatingEntityFixture _fixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BookRatingEntityMappingTests()
- {
- _fixture = new BookRatingEntityFixture();
- }
+ private readonly BookRatingEntityFixture _fixture = new();
[Fact]
public void ToResponse_WhenMappingValidBookRatingEntity_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingMappingTests.cs
index f9295dd3..7913f255 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/BookRatingMappingTests.cs
@@ -19,15 +19,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.MediaLibrary.WrittenConten
[ExcludeFromCodeCoverage]
public class BookRatingMappingTests
{
- private readonly BookRatingFixture _bookRatingFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public BookRatingMappingTests()
- {
- _bookRatingFixture = new BookRatingFixture();
- }
+ private readonly BookRatingFixture _bookRatingFixture = new();
[Fact]
public void ToRepositoryEntity_WhenMappingCompleteBookRating_ShouldMapAllPropertiesCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/IsbnDtoMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/IsbnDtoMappingTests.cs
index 50726fa0..96b6737d 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/IsbnDtoMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/IsbnDtoMappingTests.cs
@@ -19,15 +19,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.MediaLibrary.WrittenConten
[ExcludeFromCodeCoverage]
public class IsbnDtoMappingTests
{
- private readonly IsbnDtoFixture _isbnDtoFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public IsbnDtoMappingTests()
- {
- _isbnDtoFixture = new IsbnDtoFixture();
- }
+ private readonly IsbnDtoFixture _isbnDtoFixture = new();
[Fact]
public void ToDomainEntity_WhenMappingValidIsbn10Dto_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/IsbnMappingTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/IsbnMappingTests.cs
index 81441236..5f4f826a 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/IsbnMappingTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Common/Mapping/MediaLibrary/WrittenContentLibrary/BookLibrary/Common/IsbnMappingTests.cs
@@ -18,15 +18,7 @@ namespace Lumina.Application.UnitTests.Common.Mapping.MediaLibrary.WrittenConten
[ExcludeFromCodeCoverage]
public class IsbnMappingTests
{
- private readonly IsbnFixture _isbnFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public IsbnMappingTests()
- {
- _isbnFixture = new IsbnFixture();
- }
+ private readonly IsbnFixture _isbnFixture = new();
[Fact]
public void ToRepositoryEntity_WhenMappingIsbn10_ShouldMapCorrectly()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/AddRole/AddRoleCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/AddRole/AddRoleCommandHandlerTests.cs
index 38e25eb9..873db101 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/AddRole/AddRoleCommandHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/AddRole/AddRoleCommandHandlerTests.cs
@@ -32,7 +32,7 @@ public class AddRoleCommandHandlerTests
private readonly ICurrentUserService _mockCurrentUserService;
private readonly IRoleRepository _mockRoleRepository;
private readonly AddRoleCommandHandler _sut;
- private readonly AddRoleCommandFixture _addRoleCommandFixture;
+ private readonly AddRoleCommandFixture _addRoleCommandFixture = new();
private readonly Guid _userId;
///
@@ -47,7 +47,6 @@ public class AddRoleCommandHandlerTests
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
_mockRoleRepository = Substitute.For();
- _addRoleCommandFixture = new AddRoleCommandFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/AddRole/AddRoleCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/AddRole/AddRoleCommandValidatorTests.cs
index e4364da8..9ed9e01c 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/AddRole/AddRoleCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/AddRole/AddRoleCommandValidatorTests.cs
@@ -17,17 +17,8 @@ namespace Lumina.Application.UnitTests.Core.Admin.Authorization.Roles.Commands.A
[ExcludeFromCodeCoverage]
public class AddRoleCommandValidatorTests
{
- private readonly AddRoleCommandValidator _validator;
- private readonly AddRoleCommandFixture _fixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public AddRoleCommandValidatorTests()
- {
- _validator = new AddRoleCommandValidator();
- _fixture = new AddRoleCommandFixture();
- }
+ private readonly AddRoleCommandValidator _validator = new();
+ private readonly AddRoleCommandFixture _fixture = new();
[Fact]
public void Validate_WhenRoleNameIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/DeleteRole/DeleteRoleCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/DeleteRole/DeleteRoleCommandHandlerTests.cs
index f4c5b2a9..1b5b8a7d 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/DeleteRole/DeleteRoleCommandHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/DeleteRole/DeleteRoleCommandHandlerTests.cs
@@ -29,7 +29,7 @@ public class DeleteRoleCommandHandlerTests
private readonly ICurrentUserService _mockCurrentUserService;
private readonly IRoleRepository _mockRoleRepository;
private readonly DeleteRoleCommandHandler _sut;
- private readonly DeleteRoleCommandFixture _deleteRoleCommandFixture;
+ private readonly DeleteRoleCommandFixture _deleteRoleCommandFixture = new();
private readonly Guid _userId;
///
@@ -44,7 +44,6 @@ public class DeleteRoleCommandHandlerTests
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
_mockRoleRepository = Substitute.For();
- _deleteRoleCommandFixture = new DeleteRoleCommandFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/DeleteRole/DeleteRoleCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/DeleteRole/DeleteRoleCommandValidatorTests.cs
index 4f0203ad..2869e5be 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/DeleteRole/DeleteRoleCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/DeleteRole/DeleteRoleCommandValidatorTests.cs
@@ -16,15 +16,7 @@ namespace Lumina.Application.UnitTests.Core.Admin.Authorization.Roles.Commands.D
[ExcludeFromCodeCoverage]
public class DeleteRoleCommandValidatorTests
{
- private readonly DeleteRoleCommandValidator _validator;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public DeleteRoleCommandValidatorTests()
- {
- _validator = new DeleteRoleCommandValidator();
- }
+ private readonly DeleteRoleCommandValidator _validator = new();
[Fact]
public void Validate_WhenRoleIdIsEmpty_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/UpdateRole/UpdateRoleCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/UpdateRole/UpdateRoleCommandHandlerTests.cs
index fc0497b3..4cb7bc75 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/UpdateRole/UpdateRoleCommandHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/UpdateRole/UpdateRoleCommandHandlerTests.cs
@@ -32,7 +32,7 @@ public class UpdateRoleCommandHandlerTests
private readonly ICurrentUserService _mockCurrentUserService;
private readonly IRoleRepository _mockRoleRepository;
private readonly UpdateRoleCommandHandler _sut;
- private readonly UpdateRoleCommandFixture _updateRoleCommandFixture;
+ private readonly UpdateRoleCommandFixture _updateRoleCommandFixture = new();
private readonly Guid _userId;
///
@@ -47,7 +47,6 @@ public class UpdateRoleCommandHandlerTests
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
_mockRoleRepository = Substitute.For();
- _updateRoleCommandFixture = new UpdateRoleCommandFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/UpdateRole/UpdateRoleCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/UpdateRole/UpdateRoleCommandValidatorTests.cs
index 93e93d1a..4a0554f6 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/UpdateRole/UpdateRoleCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Commands/UpdateRole/UpdateRoleCommandValidatorTests.cs
@@ -17,17 +17,8 @@ namespace Lumina.Application.UnitTests.Core.Admin.Authorization.Roles.Commands.U
[ExcludeFromCodeCoverage]
public class UpdateRoleCommandValidatorTests
{
- private readonly UpdateRoleCommandValidator _validator;
- private readonly UpdateRoleCommandFixture _fixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public UpdateRoleCommandValidatorTests()
- {
- _validator = new UpdateRoleCommandValidator();
- _fixture = new UpdateRoleCommandFixture();
- }
+ private readonly UpdateRoleCommandValidator _validator = new();
+ private readonly UpdateRoleCommandFixture _fixture = new();
[Fact]
public void Validate_WhenRoleIdIsEmpty_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRolePermissions/GetRolePermissionsQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRolePermissions/GetRolePermissionsQueryHandlerTests.cs
index b388cd5a..4cf3eaab 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRolePermissions/GetRolePermissionsQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRolePermissions/GetRolePermissionsQueryHandlerTests.cs
@@ -31,7 +31,7 @@ public class GetRolePermissionsQueryHandlerTests
private readonly ICurrentUserService _mockCurrentUserService;
private readonly IRoleRepository _mockRoleRepository;
private readonly GetRolePermissionsQueryHandler _sut;
- private readonly GetRolePermissionsQueryFixture _getRolePermissionsQueryFixture;
+ private readonly GetRolePermissionsQueryFixture _getRolePermissionsQueryFixture = new();
private readonly Guid _userId;
///
@@ -46,7 +46,6 @@ public class GetRolePermissionsQueryHandlerTests
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
_mockRoleRepository = Substitute.For();
- _getRolePermissionsQueryFixture = new GetRolePermissionsQueryFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRolePermissions/GetRolePermissionsQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRolePermissions/GetRolePermissionsQueryValidatorTests.cs
index 041f3e86..8a3595e0 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRolePermissions/GetRolePermissionsQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRolePermissions/GetRolePermissionsQueryValidatorTests.cs
@@ -16,15 +16,7 @@ namespace Lumina.Application.UnitTests.Core.Admin.Authorization.Roles.Queries.Ge
[ExcludeFromCodeCoverage]
public class GetRolePermissionsQueryValidatorTests
{
- private readonly GetRolePermissionsQueryValidator _validator;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetRolePermissionsQueryValidatorTests()
- {
- _validator = new GetRolePermissionsQueryValidator();
- }
+ private readonly GetRolePermissionsQueryValidator _validator = new();
[Fact]
public void Validate_WhenRoleIdIsEmpty_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRoles/GetRolesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRoles/GetRolesQueryHandlerTests.cs
index 754655ee..4d3fe590 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRoles/GetRolesQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Admin/Authorization/Roles/Queries/GetRoles/GetRolesQueryHandlerTests.cs
@@ -30,7 +30,7 @@ public class GetRolesQueryHandlerTests
private readonly ICurrentUserService _mockCurrentUserService;
private readonly IRoleRepository _mockRoleRepository;
private readonly GetRolesQueryHandler _sut;
- private readonly GetRolesQueryFixture _getRolesQueryFixture;
+ private readonly GetRolesQueryFixture _getRolesQueryFixture = new();
private readonly Guid _userId;
///
@@ -42,7 +42,6 @@ public class GetRolesQueryHandlerTests
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
_mockRoleRepository = Substitute.For();
- _getRolesQueryFixture = new GetRolesQueryFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandlerTests.cs
index e020367f..0efb2263 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryHandlerTests.cs
@@ -29,8 +29,8 @@ public class GetDirectoriesQueryHandlerTests
private readonly IFixture _fixture;
private readonly IDirectoryService _mockDirectoryService;
private readonly GetDirectoriesQueryHandler _sut;
- private readonly DirectoryFixture _directoryFixture;
- private readonly GetDirectoriesQueryFixture _getDirectoriesQueryFixture;
+ private readonly DirectoryFixture _directoryFixture = new();
+ private readonly GetDirectoriesQueryFixture _getDirectoriesQueryFixture = new();
///
/// Initializes a new instance of the class.
@@ -43,8 +43,6 @@ public class GetDirectoriesQueryHandlerTests
mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new GetDirectoriesQueryHandler(_mockDirectoryService, mockValidator);
- _directoryFixture = new DirectoryFixture();
- _getDirectoriesQueryFixture = new GetDirectoriesQueryFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidatorTests.cs
index efbc046e..055c3ef5 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Directories/Queries/GetDirectories/GetDirectoriesQueryValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Directories.Que
[ExcludeFromCodeCoverage]
public class GetDirectoriesQueryValidatorTests
{
- private readonly GetDirectoriesQueryValidator _validator;
- private readonly GetDirectoriesQueryFixture _getDirectoriesQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetDirectoriesQueryValidatorTests()
- {
- _validator = new GetDirectoriesQueryValidator();
- _getDirectoriesQueryFixture = new GetDirectoriesQueryFixture();
- }
+ private readonly GetDirectoriesQueryValidator _validator = new();
+ private readonly GetDirectoriesQueryFixture _getDirectoriesQueryFixture = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Drives/Queries/GetDrives/GetDrivesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Drives/Queries/GetDrives/GetDrivesQueryHandlerTests.cs
index 06791d7c..1acaa59b 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Drives/Queries/GetDrives/GetDrivesQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Drives/Queries/GetDrives/GetDrivesQueryHandlerTests.cs
@@ -25,7 +25,7 @@ public class GetDrivesQueryHandlerTests
{
private readonly IDriveService _mockDriveService;
private readonly GetDrivesQueryHandler _sut;
- private readonly GetDrivesQueryFixture _getDrivesQueryFixture;
+ private readonly GetDrivesQueryFixture _getDrivesQueryFixture = new();
///
/// Initializes a new instance of the class.
@@ -33,7 +33,6 @@ public class GetDrivesQueryHandlerTests
public GetDrivesQueryHandlerTests()
{
_mockDriveService = Substitute.For();
- _getDrivesQueryFixture = new GetDrivesQueryFixture();
_sut = new GetDrivesQueryHandler(_mockDriveService);
}
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandlerTests.cs
index 0c3c27d3..09c36028 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/FileSystem/Queries/GetFileSystem/GetFileSystemQueryHandlerTests.cs
@@ -25,7 +25,7 @@ public class GetFileSystemQueryHandlerTests
private readonly IPlatformContextManager _mockPlatformContextManager;
private readonly IPlatformContext _mockPlatformContext;
private readonly GetFileSystemQueryHandler _sut;
- private readonly GetFileSystemQueryFixture _getFileSystemQueryFixture;
+ private readonly GetFileSystemQueryFixture _getFileSystemQueryFixture = new();
///
/// Initializes a new instance of the class.
@@ -36,7 +36,6 @@ public class GetFileSystemQueryHandlerTests
_mockPlatformContextManager = Substitute.For();
_mockPlatformContext = Substitute.For();
_mockPlatformContextManager.GetCurrentContext().Returns(_mockPlatformContext);
- _getFileSystemQueryFixture = new GetFileSystemQueryFixture();
_sut = new GetFileSystemQueryHandler(_mockPlatformContextManager);
}
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetFiles/GetFilesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetFiles/GetFilesQueryHandlerTests.cs
index 8aba98cc..0ffcb560 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetFiles/GetFilesQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetFiles/GetFilesQueryHandlerTests.cs
@@ -29,8 +29,8 @@ public class GetFilesQueryHandlerTests
private readonly IFixture _fixture;
private readonly IFileService _mockFileService;
private readonly GetFilesQueryHandler _sut;
- private readonly FileFixture _fileFixture;
- private readonly GetFilesQueryFixture _getFilesQueryFixture;
+ private readonly FileFixture _fileFixture = new();
+ private readonly GetFilesQueryFixture _getFilesQueryFixture = new();
///
/// Initializes a new instance of the class.
@@ -43,8 +43,6 @@ public class GetFilesQueryHandlerTests
mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new GetFilesQueryHandler(_mockFileService, mockValidator);
- _fileFixture = new FileFixture();
- _getFilesQueryFixture = new GetFilesQueryFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetFiles/GetFilesQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetFiles/GetFilesQueryValidatorTests.cs
index 07b56273..4cd5eeb6 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetFiles/GetFilesQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetFiles/GetFilesQueryValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Files.Queries.G
[ExcludeFromCodeCoverage]
public class GetFilesQueryValidatorTests
{
- private readonly GetFilesQueryValidator _validator;
- private readonly GetFilesQueryFixture _getFilesQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetFilesQueryValidatorTests()
- {
- _validator = new GetFilesQueryValidator();
- _getFilesQueryFixture = new GetFilesQueryFixture();
- }
+ private readonly GetFilesQueryValidator _validator = new();
+ private readonly GetFilesQueryFixture _getFilesQueryFixture = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandlerTests.cs
index 0606aaa5..8d0809db 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryHandlerTests.cs
@@ -29,8 +29,8 @@ public class GetTreeFilesQueryHandlerTests
private readonly IFixture _fixture;
private readonly IFileService _mockFileService;
private readonly GetTreeFilesQueryHandler _sut;
- private readonly FileFixture _fileFixture;
- private readonly GetTreeFilesQueryFixture _getTreeFilesQueryFixture;
+ private readonly FileFixture _fileFixture = new();
+ private readonly GetTreeFilesQueryFixture _getTreeFilesQueryFixture = new();
///
/// Initializes a new instance of the class.
@@ -43,8 +43,6 @@ public class GetTreeFilesQueryHandlerTests
mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new GetTreeFilesQueryHandler(_mockFileService, mockValidator);
- _fileFixture = new FileFixture();
- _getTreeFilesQueryFixture = new GetTreeFilesQueryFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidatorTests.cs
index d3584791..af7e9e65 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Files/Queries/GetTreeFiles/GetTreeFilesQueryValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Files.Queries.G
[ExcludeFromCodeCoverage]
public class GetTreeFilesQueryValidatorTests
{
- private readonly GetTreeFilesQueryValidator _validator;
- private readonly GetTreeFilesQueryFixture _getTreeFilesQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetTreeFilesQueryValidatorTests()
- {
- _validator = new GetTreeFilesQueryValidator();
- _getTreeFilesQueryFixture = new GetTreeFilesQueryFixture();
- }
+ private readonly GetTreeFilesQueryValidator _validator = new();
+ private readonly GetTreeFilesQueryFixture _getTreeFilesQueryFixture = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/CombinePath/CombinePathCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/CombinePath/CombinePathCommandHandlerTests.cs
index c3889629..0c79b1a6 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/CombinePath/CombinePathCommandHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/CombinePath/CombinePathCommandHandlerTests.cs
@@ -24,7 +24,7 @@ public class CombinePathCommandHandlerTests
private readonly IFixture _fixture;
private readonly IPathService _mockPathService;
private readonly CombinePathCommandHandler _sut;
- private readonly CombinePathCommandFixture _combinePathCommandFixture;
+ private readonly CombinePathCommandFixture _combinePathCommandFixture = new();
///
/// Initializes a new instance of the class.
@@ -37,7 +37,6 @@ public class CombinePathCommandHandlerTests
mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new CombinePathCommandHandler(_mockPathService, mockValidator);
- _combinePathCommandFixture = new CombinePathCommandFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/CombinePath/CombinePathCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/CombinePath/CombinePathCommandValidatorTests.cs
index fbbae628..0e47f421 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/CombinePath/CombinePathCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/CombinePath/CombinePathCommandValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Paths.Commands.
[ExcludeFromCodeCoverage]
public class CombinePathCommandValidatorTests
{
- private readonly CombinePathCommandValidator _validator;
- private readonly CombinePathCommandFixture _combinePathCommandFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CombinePathCommandValidatorTests()
- {
- _validator = new CombinePathCommandValidator();
- _combinePathCommandFixture = new CombinePathCommandFixture();
- }
+ private readonly CombinePathCommandValidator _validator = new();
+ private readonly CombinePathCommandFixture _combinePathCommandFixture = new();
[Fact]
public void Validate_WhenOriginalPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/SplitPath/SplitPathCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/SplitPath/SplitPathCommandHandlerTests.cs
index 2d96444a..ec217456 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/SplitPath/SplitPathCommandHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/SplitPath/SplitPathCommandHandlerTests.cs
@@ -29,8 +29,8 @@ public class SplitPathCommandHandlerTests
private readonly IFixture _fixture;
private readonly IPathService _mockPathService;
private readonly SplitPathCommandHandler _sut;
- private readonly PathSegmentFixture _pathSegmentFixture;
- private readonly SplitPathCommandFixture _splitPathCommandFixture;
+ private readonly PathSegmentFixture _pathSegmentFixture = new();
+ private readonly SplitPathCommandFixture _splitPathCommandFixture = new();
///
/// Initializes a new instance of the class.
@@ -43,8 +43,6 @@ public class SplitPathCommandHandlerTests
mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new SplitPathCommandHandler(_mockPathService, mockValidator);
- _pathSegmentFixture = new PathSegmentFixture();
- _splitPathCommandFixture = new SplitPathCommandFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/SplitPath/SplitPathCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/SplitPath/SplitPathCommandValidatorTests.cs
index 44a38426..52cba0fe 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/SplitPath/SplitPathCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Commands/SplitPath/SplitPathCommandValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Paths.Commands.
[ExcludeFromCodeCoverage]
public class SplitPathCommandValidatorTests
{
- private readonly SplitPathCommandValidator _validator;
- private readonly SplitPathCommandFixture _splitPathCommandFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public SplitPathCommandValidatorTests()
- {
- _validator = new SplitPathCommandValidator();
- _splitPathCommandFixture = new SplitPathCommandFixture();
- }
+ private readonly SplitPathCommandValidator _validator = new();
+ private readonly SplitPathCommandFixture _splitPathCommandFixture = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryHandlerTests.cs
index 8a4f4e24..5c46c28a 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryHandlerTests.cs
@@ -21,7 +21,7 @@ public class CheckPathExistsQueryHandlerTests
{
private readonly IPathService _mockPathService;
private readonly CheckPathExistsQueryHandler _sut;
- private readonly CheckPathExistsQueryFixture _checkPathExistsQueryFixture;
+ private readonly CheckPathExistsQueryFixture _checkPathExistsQueryFixture = new();
///
/// Initializes a new instance of the class.
@@ -29,7 +29,6 @@ public class CheckPathExistsQueryHandlerTests
public CheckPathExistsQueryHandlerTests()
{
_mockPathService = Substitute.For();
- _checkPathExistsQueryFixture = new CheckPathExistsQueryFixture();
IValidator mockValidator = Substitute.For>();
mockValidator.Validate(Arg.Any())
.Returns([]);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryValidatorTests.cs
index 509bd2d9..8bc17a58 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/CheckPathExists/CheckPathExistsQueryValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Paths.Queries.C
[ExcludeFromCodeCoverage]
public class CheckPathExistsQueryValidatorTests
{
- private readonly CheckPathExistsQueryValidator _validator;
- private readonly CheckPathExistsQueryFixture _checkPathExistsQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CheckPathExistsQueryValidatorTests()
- {
- _validator = new CheckPathExistsQueryValidator();
- _checkPathExistsQueryFixture = new CheckPathExistsQueryFixture();
- }
+ private readonly CheckPathExistsQueryValidator _validator = new();
+ private readonly CheckPathExistsQueryFixture _checkPathExistsQueryFixture = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathParent/GetPathParentQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathParent/GetPathParentQueryHandlerTests.cs
index b0c4f7d4..1089192a 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathParent/GetPathParentQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathParent/GetPathParentQueryHandlerTests.cs
@@ -28,8 +28,8 @@ public class GetPathParentQueryHandlerTests
private readonly IFixture _fixture;
private readonly IPathService _mockPathService;
private readonly GetPathParentQueryHandler _sut;
- private readonly PathSegmentFixture _pathSegmentFixture;
- private readonly GetPathParentQueryFixture _getPathParentQueryFixture;
+ private readonly PathSegmentFixture _pathSegmentFixture = new();
+ private readonly GetPathParentQueryFixture _getPathParentQueryFixture = new();
public GetPathParentQueryHandlerTests()
{
@@ -39,8 +39,6 @@ public class GetPathParentQueryHandlerTests
mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new GetPathParentQueryHandler(_mockPathService, mockValidator);
- _pathSegmentFixture = new PathSegmentFixture();
- _getPathParentQueryFixture = new GetPathParentQueryFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathParent/GetPathParentQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathParent/GetPathParentQueryValidatorTests.cs
index efbb62c6..a4db12ae 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathParent/GetPathParentQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathParent/GetPathParentQueryValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Paths.Queries.G
[ExcludeFromCodeCoverage]
public class GetPathParentQueryValidatorTests
{
- private readonly GetPathParentQueryValidator _validator;
- private readonly GetPathParentQueryFixture _getPathParentQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetPathParentQueryValidatorTests()
- {
- _validator = new GetPathParentQueryValidator();
- _getPathParentQueryFixture = new GetPathParentQueryFixture();
- }
+ private readonly GetPathParentQueryValidator _validator = new();
+ private readonly GetPathParentQueryFixture _getPathParentQueryFixture = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathRoot/GetPathRootQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathRoot/GetPathRootQueryHandlerTests.cs
index 6573911a..a1936c62 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathRoot/GetPathRootQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathRoot/GetPathRootQueryHandlerTests.cs
@@ -23,8 +23,8 @@ public class GetPathRootQueryHandlerTests
{
private readonly IPathService _mockPathService;
private readonly GetPathRootQueryHandler _sut;
- private readonly PathSegmentFixture _pathSegmentFixture;
- private readonly GetPathRootQueryFixture _getPathRootQueryFixture;
+ private readonly PathSegmentFixture _pathSegmentFixture = new();
+ private readonly GetPathRootQueryFixture _getPathRootQueryFixture = new();
///
/// Initializes a new instance of the class.
@@ -32,12 +32,10 @@ public class GetPathRootQueryHandlerTests
public GetPathRootQueryHandlerTests()
{
_mockPathService = Substitute.For();
- _getPathRootQueryFixture = new GetPathRootQueryFixture();
IValidator mockValidator = Substitute.For>();
mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new GetPathRootQueryHandler(_mockPathService, mockValidator);
- _pathSegmentFixture = new PathSegmentFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathRoot/GetPathRootQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathRoot/GetPathRootQueryValidatorTests.cs
index afccc8a6..c484b9aa 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathRoot/GetPathRootQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/GetPathRoot/GetPathRootQueryValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Paths.Queries.G
[ExcludeFromCodeCoverage]
public class GetPathRootQueryValidatorTests
{
- private readonly GetPathRootQueryValidator _validator;
- private readonly GetPathRootQueryFixture _getPathRootQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetPathRootQueryValidatorTests()
- {
- _validator = new GetPathRootQueryValidator();
- _getPathRootQueryFixture = new GetPathRootQueryFixture();
- }
+ private readonly GetPathRootQueryValidator _validator = new();
+ private readonly GetPathRootQueryFixture _getPathRootQueryFixture = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/ValidatePath/ValidatePathQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/ValidatePath/ValidatePathQueryHandlerTests.cs
index 539924e2..08138c98 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/ValidatePath/ValidatePathQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/ValidatePath/ValidatePathQueryHandlerTests.cs
@@ -23,7 +23,7 @@ public class ValidatePathQueryHandlerTests
private readonly IPathService _mockPathService;
private readonly IValidator _mockValidator;
private readonly ValidatePathQueryHandler _sut;
- private readonly ValidatePathQueryFixture _validatePathQueryFixture;
+ private readonly ValidatePathQueryFixture _validatePathQueryFixture = new();
///
/// Initializes a new instance of the class.
@@ -32,7 +32,6 @@ public class ValidatePathQueryHandlerTests
{
_mockPathService = Substitute.For();
_mockValidator = Substitute.For>();
- _validatePathQueryFixture = new ValidatePathQueryFixture();
_mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new ValidatePathQueryHandler(_mockPathService, _mockValidator);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/ValidatePath/ValidatePathQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/ValidatePath/ValidatePathQueryValidatorTests.cs
index d03e8485..3794d70b 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/ValidatePath/ValidatePathQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Paths/Queries/ValidatePath/ValidatePathQueryValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Paths.Queries.V
[ExcludeFromCodeCoverage]
public class ValidatePathQueryValidatorTests
{
- private readonly ValidatePathQueryValidator _validator;
- private readonly ValidatePathQueryFixture _validatePathQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ValidatePathQueryValidatorTests()
- {
- _validator = new ValidatePathQueryValidator();
- _validatePathQueryFixture = new ValidatePathQueryFixture();
- }
+ private readonly ValidatePathQueryValidator _validator = new();
+ private readonly ValidatePathQueryFixture _validatePathQueryFixture = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandlerTests.cs
index 5d07341e..8a45fef0 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryHandlerTests.cs
@@ -26,15 +26,13 @@ public class GetThumbnailQueryHandlerTests
private readonly IFixture _fixture;
private readonly IThumbnailService _mockThumbnailService;
private readonly GetThumbnailQueryHandler _sut;
- private readonly GetThumbnailQueryFixture _getThumbnailQueryFixture;
- private readonly ThumbnailFixture _thumbnailFixture;
+ private readonly GetThumbnailQueryFixture _getThumbnailQueryFixture = new();
+ private readonly ThumbnailFixture _thumbnailFixture = new();
public GetThumbnailQueryHandlerTests()
{
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
_mockThumbnailService = Substitute.For();
- _getThumbnailQueryFixture = new GetThumbnailQueryFixture();
- _thumbnailFixture = new ThumbnailFixture();
IValidator mockValidator = Substitute.For>();
mockValidator.Validate(Arg.Any())
.Returns([]);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidatorTests.cs
index 3af9c041..1f15f1df 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/FileSystemManagement/Thumbnails/Queries/GetThumbnail/GetThumbnailQueryValidatorTests.cs
@@ -15,15 +15,7 @@ namespace Lumina.Application.UnitTests.Core.FileSystemManagement.Thumbnails.Quer
[ExcludeFromCodeCoverage]
public class GetThumbnailQueryValidatorTests
{
- private readonly GetThumbnailQueryValidator _validator;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetThumbnailQueryValidatorTests()
- {
- _validator = new GetThumbnailQueryValidator();
- }
+ private readonly GetThumbnailQueryValidator _validator = new();
[Fact]
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Maintenance/ApplicationSetup/Commands/SetupApplication/SetupApplicationCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Maintenance/ApplicationSetup/Commands/SetupApplication/SetupApplicationCommandHandlerTests.cs
index 605f3974..ef38a48c 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Maintenance/ApplicationSetup/Commands/SetupApplication/SetupApplicationCommandHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Maintenance/ApplicationSetup/Commands/SetupApplication/SetupApplicationCommandHandlerTests.cs
@@ -39,7 +39,7 @@ public class SetupApplicationCommandHandlerTests
private readonly IDataSeedService _mockDataSeedService;
private readonly SetupApplicationCommandHandler _sut;
private readonly UserEntityFixture _userEntityFixture = new();
- private readonly SetupApplicationCommandFixture _setupApplicationCommandFixture;
+ private readonly SetupApplicationCommandFixture _setupApplicationCommandFixture = new();
///
/// Initializes a new instance of the class.
@@ -54,7 +54,6 @@ public class SetupApplicationCommandHandlerTests
_mockUserRepository = Substitute.For();
_mockDateTimeProvider = Substitute.For();
_mockDataSeedService = Substitute.For();
- _setupApplicationCommandFixture = new SetupApplicationCommandFixture();
IValidator mockValidator = Substitute.For>();
mockValidator.Validate(Arg.Any())
.Returns([]);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/Maintenance/ApplicationSetup/Commands/SetupApplication/SetupApplicationCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/Maintenance/ApplicationSetup/Commands/SetupApplication/SetupApplicationCommandValidatorTests.cs
index 18f6274f..81ef3d81 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/Maintenance/ApplicationSetup/Commands/SetupApplication/SetupApplicationCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/Maintenance/ApplicationSetup/Commands/SetupApplication/SetupApplicationCommandValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.Maintenance.ApplicationSetup.Command
[ExcludeFromCodeCoverage]
public class SetupApplicationCommandValidatorTests
{
- private readonly SetupApplicationCommandValidator _validator;
- private readonly SetupApplicationCommandFixture _commandFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public SetupApplicationCommandValidatorTests()
- {
- _validator = new SetupApplicationCommandValidator();
- _commandFixture = new SetupApplicationCommandFixture();
- }
+ private readonly SetupApplicationCommandValidator _validator = new();
+ private readonly SetupApplicationCommandFixture _commandFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandlerTests.cs
index cb99eb8d..fbe1d2f8 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandHandlerTests.cs
@@ -33,7 +33,7 @@ public class AddBookCommandHandlerTests
private readonly IUnitOfWork _mockUnitOfWork;
private readonly IBookRepository _mockBookRepository;
private readonly AddBookCommandHandler _sut;
- private readonly AddBookCommandFixture _commandBookFixture;
+ private readonly AddBookCommandFixture _commandBookFixture = new();
///
/// Initializes a new instance of the class.
@@ -53,7 +53,6 @@ public class AddBookCommandHandlerTests
mockValidator.Validate(Arg.Any())
.Returns([]);
_sut = new AddBookCommandHandler(_mockUnitOfWork, mockValidator);
- _commandBookFixture = new AddBookCommandFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandValidatorTests.cs
index f5d3d9cb..731697a1 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/MediaLibrary/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBook/AddBookCommandValidatorTests.cs
@@ -20,17 +20,8 @@ namespace Lumina.Application.UnitTests.Core.MediaLibrary.WrittenContentLibrary.B
[ExcludeFromCodeCoverage]
public class AddBookCommandValidatorTests
{
- private readonly AddBookCommandFixture _commandBookFixture;
- private readonly AddBookCommandValidator _validator;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public AddBookCommandValidatorTests()
- {
- _validator = new AddBookCommandValidator();
- _commandBookFixture = new AddBookCommandFixture();
- }
+ private readonly AddBookCommandFixture _commandBookFixture = new();
+ private readonly AddBookCommandValidator _validator = new();
[Fact]
public void Validate_WhenTitleIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/ChangePassword/ChangePasswordCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/ChangePassword/ChangePasswordCommandValidatorTests.cs
index adfaf453..c38a7a64 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/ChangePassword/ChangePasswordCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/ChangePassword/ChangePasswordCommandValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authentication.Comma
[ExcludeFromCodeCoverage]
public class ChangePasswordCommandValidatorTests
{
- private readonly ChangePasswordCommandValidator _validator;
- private readonly ChangePasswordCommandFixture _changePasswordCommandFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ChangePasswordCommandValidatorTests()
- {
- _validator = new ChangePasswordCommandValidator();
- _changePasswordCommandFixture = new ChangePasswordCommandFixture();
- }
+ private readonly ChangePasswordCommandValidator _validator = new();
+ private readonly ChangePasswordCommandFixture _changePasswordCommandFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/RecoverPassword/RecoverPasswordCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/RecoverPassword/RecoverPasswordCommandValidatorTests.cs
index 7cb02f9a..408a7781 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/RecoverPassword/RecoverPasswordCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/RecoverPassword/RecoverPasswordCommandValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authentication.Comma
[ExcludeFromCodeCoverage]
public class RecoverPasswordCommandValidatorTests
{
- private readonly RecoverPasswordCommandValidator _validator;
- private readonly RecoverPasswordCommandFixture _recoverPasswordCommandFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RecoverPasswordCommandValidatorTests()
- {
- _validator = new RecoverPasswordCommandValidator();
- _recoverPasswordCommandFixture = new RecoverPasswordCommandFixture();
- }
+ private readonly RecoverPasswordCommandValidator _validator = new();
+ private readonly RecoverPasswordCommandFixture _recoverPasswordCommandFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/RegisterUser/RegisterUserCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/RegisterUser/RegisterUserCommandValidatorTests.cs
index 65241a0d..659b8e55 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/RegisterUser/RegisterUserCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Commands/RegisterUser/RegisterUserCommandValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authentication.Comma
[ExcludeFromCodeCoverage]
public class RegisterUserCommandValidatorTests
{
- private readonly RegisterUserCommandValidator _validator;
- private readonly RegisterUserCommandFixture _registerUserCommandFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public RegisterUserCommandValidatorTests()
- {
- _validator = new RegisterUserCommandValidator();
- _registerUserCommandFixture = new RegisterUserCommandFixture();
- }
+ private readonly RegisterUserCommandValidator _validator = new();
+ private readonly RegisterUserCommandFixture _registerUserCommandFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Queries/GetUsers/GetUsersQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Queries/GetUsers/GetUsersQueryHandlerTests.cs
index 80d5289e..c2329892 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Queries/GetUsers/GetUsersQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Queries/GetUsers/GetUsersQueryHandlerTests.cs
@@ -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;
///
@@ -45,7 +45,6 @@ public class GetUsersQueryHandlerTests
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
_mockUserRepository = Substitute.For();
- _getUsersQueryFixture = new GetUsersQueryFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Queries/LoginUser/LoginUserQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Queries/LoginUser/LoginUserQueryValidatorTests.cs
index 02f22e97..5597ea95 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Queries/LoginUser/LoginUserQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authentication/Queries/LoginUser/LoginUserQueryValidatorTests.cs
@@ -16,17 +16,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authentication.Queri
[ExcludeFromCodeCoverage]
public class LoginUserQueryValidatorTests
{
- private readonly LoginUserQueryValidator _validator;
- private readonly LoginUserQueryFixture _loginUserQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public LoginUserQueryValidatorTests()
- {
- _validator = new LoginUserQueryValidator();
- _loginUserQueryFixture = new LoginUserQueryFixture();
- }
+ private readonly LoginUserQueryValidator _validator = new();
+ private readonly LoginUserQueryFixture _loginUserQueryFixture = new();
[Fact]
public void Validate_WhenUsernameIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Commands/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsCommandHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Commands/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsCommandHandlerTests.cs
index 7200e4c3..3766c137 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Commands/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsCommandHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Commands/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsCommandHandlerTests.cs
@@ -40,7 +40,7 @@ public class UpdateUserRoleAndPermissionsCommandHandlerTests
private readonly IPermissionRepository _mockPermissionRepository;
private readonly UpdateUserRoleAndPermissionsCommandHandler _sut;
private readonly UserEntityFixture _userEntityFixture = new();
- private readonly UpdateUserRoleAndPermissionsCommandFixture _updateUserRoleAndPermissionsCommandFixture;
+ private readonly UpdateUserRoleAndPermissionsCommandFixture _updateUserRoleAndPermissionsCommandFixture = new();
private readonly Guid _userId;
///
@@ -54,7 +54,6 @@ public class UpdateUserRoleAndPermissionsCommandHandlerTests
_mockUserRepository = Substitute.For();
_mockRoleRepository = Substitute.For();
_mockPermissionRepository = Substitute.For();
- _updateUserRoleAndPermissionsCommandFixture = new UpdateUserRoleAndPermissionsCommandFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Commands/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsCommandValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Commands/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsCommandValidatorTests.cs
index 90f2cfb4..c8c98f9d 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Commands/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsCommandValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Commands/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsCommandValidatorTests.cs
@@ -17,15 +17,7 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authorization.Comman
[ExcludeFromCodeCoverage]
public class UpdateUserRoleAndPermissionsCommandValidatorTests
{
- private readonly UpdateUserRoleAndPermissionsCommandValidator _validator;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public UpdateUserRoleAndPermissionsCommandValidatorTests()
- {
- _validator = new UpdateUserRoleAndPermissionsCommandValidator();
- }
+ private readonly UpdateUserRoleAndPermissionsCommandValidator _validator = new();
[Fact]
public void Validate_WhenUserIdIsEmpty_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetAuthorization/GetAuthorizationQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetAuthorization/GetAuthorizationQueryHandlerTests.cs
index d96bcafc..49ac51ec 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetAuthorization/GetAuthorizationQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetAuthorization/GetAuthorizationQueryHandlerTests.cs
@@ -27,8 +27,8 @@ public class GetAuthorizationQueryHandlerTests
private readonly IAuthorizationService _mockAuthorizationService;
private readonly ICurrentUserService _mockCurrentUserService;
private readonly GetAuthorizationQueryHandler _sut;
- private readonly GetAuthorizationQueryFixture _getAuthorizationQueryFixture;
- private readonly UserAuthorizationEntityFixture _userAuthorizationEntityFixture;
+ private readonly GetAuthorizationQueryFixture _getAuthorizationQueryFixture = new();
+ private readonly UserAuthorizationEntityFixture _userAuthorizationEntityFixture = new();
///
/// Initializes a new instance of the class.
@@ -37,8 +37,6 @@ public class GetAuthorizationQueryHandlerTests
{
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
- _getAuthorizationQueryFixture = new GetAuthorizationQueryFixture();
- _userAuthorizationEntityFixture = new UserAuthorizationEntityFixture();
IValidator mockValidator = Substitute.For>();
mockValidator.Validate(Arg.Any())
.Returns([]);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetAuthorization/GetAuthorizationQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetAuthorization/GetAuthorizationQueryValidatorTests.cs
index 682379fd..4831a89b 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetAuthorization/GetAuthorizationQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetAuthorization/GetAuthorizationQueryValidatorTests.cs
@@ -17,17 +17,8 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authorization.Querie
[ExcludeFromCodeCoverage]
public class GetAuthorizationQueryValidatorTests
{
- private readonly GetAuthorizationQueryValidator _validator;
- private readonly GetAuthorizationQueryFixture _getAuthorizationQueryFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetAuthorizationQueryValidatorTests()
- {
- _validator = new GetAuthorizationQueryValidator();
- _getAuthorizationQueryFixture = new GetAuthorizationQueryFixture();
- }
+ private readonly GetAuthorizationQueryValidator _validator = new();
+ private readonly GetAuthorizationQueryFixture _getAuthorizationQueryFixture = new();
[Fact]
public void Validate_WhenUserIdIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserPermissions/GetUserPermissionsQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserPermissions/GetUserPermissionsQueryHandlerTests.cs
index 65c6d207..7a249c4d 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserPermissions/GetUserPermissionsQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserPermissions/GetUserPermissionsQueryHandlerTests.cs
@@ -33,7 +33,7 @@ public class GetUserPermissionsQueryHandlerTests
private readonly ICurrentUserService _mockCurrentUserService;
private readonly IUserRepository _mockUserRepository;
private readonly GetUserPermissionsQueryHandler _sut;
- private readonly GetUserPermissionsQueryFixture _getUserPermissionsQueryFixture;
+ private readonly GetUserPermissionsQueryFixture _getUserPermissionsQueryFixture = new();
private readonly Guid _userId;
///
@@ -45,7 +45,6 @@ public class GetUserPermissionsQueryHandlerTests
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
_mockUserRepository = Substitute.For();
- _getUserPermissionsQueryFixture = new GetUserPermissionsQueryFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserPermissions/GetUserPermissionsQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserPermissions/GetUserPermissionsQueryValidatorTests.cs
index 74faf8e4..9b8f07e5 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserPermissions/GetUserPermissionsQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserPermissions/GetUserPermissionsQueryValidatorTests.cs
@@ -16,15 +16,7 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authorization.Querie
[ExcludeFromCodeCoverage]
public class GetUserPermissionsQueryValidatorTests
{
- private readonly GetUserPermissionsQueryValidator _validator;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetUserPermissionsQueryValidatorTests()
- {
- _validator = new GetUserPermissionsQueryValidator();
- }
+ private readonly GetUserPermissionsQueryValidator _validator = new();
[Fact]
public void Validate_WhenUserIdIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserRole/GetUserRoleQueryHandlerTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserRole/GetUserRoleQueryHandlerTests.cs
index 213adacb..8b79af52 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserRole/GetUserRoleQueryHandlerTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserRole/GetUserRoleQueryHandlerTests.cs
@@ -32,7 +32,7 @@ public class GetUserRoleQueryHandlerTests
private readonly IUserRepository _mockUserRepository;
private readonly GetUserRoleQueryHandler _sut;
private readonly UserEntityFixture _userEntityFixture = new();
- private readonly GetUserRoleQueryFixture _getUserRoleQueryFixture;
+ private readonly GetUserRoleQueryFixture _getUserRoleQueryFixture = new();
private readonly Guid _userId;
///
@@ -44,7 +44,6 @@ public class GetUserRoleQueryHandlerTests
_mockAuthorizationService = Substitute.For();
_mockCurrentUserService = Substitute.For();
_mockUserRepository = Substitute.For();
- _getUserRoleQueryFixture = new GetUserRoleQueryFixture();
_userId = Guid.NewGuid();
_mockCurrentUserService.UserId.Returns(_userId);
diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserRole/GetUserRoleQueryValidatorTests.cs b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserRole/GetUserRoleQueryValidatorTests.cs
index ecad2004..3212ed10 100644
--- a/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserRole/GetUserRoleQueryValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Application.UnitTests/Core/UsersManagement/Authorization/Queries/GetUserRole/GetUserRoleQueryValidatorTests.cs
@@ -16,15 +16,7 @@ namespace Lumina.Application.UnitTests.Core.UsersManagement.Authorization.Querie
[ExcludeFromCodeCoverage]
public class GetUserRoleQueryValidatorTests
{
- private readonly GetUserRoleQueryValidator _validator;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public GetUserRoleQueryValidatorTests()
- {
- _validator = new GetUserRoleQueryValidator();
- }
+ private readonly GetUserRoleQueryValidator _validator = new();
[Fact]
public void Validate_WhenUserIdIsNull_ShouldHaveValidationError()
diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/PermissionRepositoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/PermissionRepositoryTests.cs
index 9e017d42..16fdd5a1 100644
--- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/PermissionRepositoryTests.cs
+++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/PermissionRepositoryTests.cs
@@ -26,7 +26,7 @@ public class PermissionRepositoryTests
{
private readonly LuminaDbContext _mockContext;
private readonly PermissionRepository _sut;
- private readonly PermissionEntityFixture _permissionEntityFixture;
+ private readonly PermissionEntityFixture _permissionEntityFixture = new();
///
/// Initializes a new instance of the class.
@@ -35,7 +35,6 @@ public class PermissionRepositoryTests
{
_mockContext = Create.MockedDbContextFor();
_sut = new PermissionRepository(_mockContext);
- _permissionEntityFixture = new PermissionEntityFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/RolePermissionRepositoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/RolePermissionRepositoryTests.cs
index 67e1f18f..76186782 100644
--- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/RolePermissionRepositoryTests.cs
+++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/RolePermissionRepositoryTests.cs
@@ -23,7 +23,7 @@ public class RolePermissionRepositoryTests
{
private readonly LuminaDbContext _mockContext;
private readonly RolePermissionRepository _sut;
- private readonly RolePermissionEntityFixture _rolePermissionEntityFixture;
+ private readonly RolePermissionEntityFixture _rolePermissionEntityFixture = new();
///
/// Initializes a new instance of the class.
@@ -32,7 +32,6 @@ public class RolePermissionRepositoryTests
{
_mockContext = Create.MockedDbContextFor();
_sut = new RolePermissionRepository(_mockContext);
- _rolePermissionEntityFixture = new RolePermissionEntityFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/UserRoleRepositoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/UserRoleRepositoryTests.cs
index 0951abfe..55ca950d 100644
--- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/UserRoleRepositoryTests.cs
+++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Authorization/UserRoleRepositoryTests.cs
@@ -23,7 +23,7 @@ public class UserRoleRepositoryTests
{
private readonly LuminaDbContext _mockContext;
private readonly UserRoleRepository _sut;
- private readonly UserRoleEntityFixture _userRoleEntityFixture;
+ private readonly UserRoleEntityFixture _userRoleEntityFixture = new();
///
/// Initializes a new instance of the class.
@@ -32,7 +32,6 @@ public class UserRoleRepositoryTests
{
_mockContext = Create.MockedDbContextFor();
_sut = new UserRoleRepository(_mockContext);
- _userRoleEntityFixture = new UserRoleEntityFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/BookRepositoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/BookRepositoryTests.cs
index c55ebf42..a5d2b1ab 100644
--- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/BookRepositoryTests.cs
+++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Books/BookRepositoryTests.cs
@@ -28,7 +28,7 @@ public class BookRepositoryTests
{
private readonly LuminaDbContext _mockContext;
private readonly BookRepository _sut;
- private readonly BookEntityFixture _bookEntityFixture;
+ private readonly BookEntityFixture _bookEntityFixture = new();
///
/// Initializes a new instance of the class.
@@ -37,7 +37,6 @@ public class BookRepositoryTests
{
_mockContext = Create.MockedDbContextFor();
_sut = new BookRepository(_mockContext);
- _bookEntityFixture = new BookEntityFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Plugins/LibraryMetadataProviderConfigurationRepositoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Plugins/LibraryMetadataProviderConfigurationRepositoryTests.cs
index 99e42a08..9821f0f5 100644
--- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Plugins/LibraryMetadataProviderConfigurationRepositoryTests.cs
+++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Plugins/LibraryMetadataProviderConfigurationRepositoryTests.cs
@@ -20,7 +20,7 @@ public class LibraryMetadataProviderConfigurationRepositoryTests
{
private readonly LuminaDbContext _mockContext;
private readonly LibraryMetadataProviderConfigurationRepository _sut;
- private readonly LibraryMetadataProviderConfigurationEntityFixture _configurationFixture;
+ private readonly LibraryMetadataProviderConfigurationEntityFixture _configurationFixture = new();
///
/// Initializes a new instance of the class.
@@ -29,7 +29,6 @@ public class LibraryMetadataProviderConfigurationRepositoryTests
{
_mockContext = Create.MockedDbContextFor();
_sut = new LibraryMetadataProviderConfigurationRepository(_mockContext);
- _configurationFixture = new LibraryMetadataProviderConfigurationEntityFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Plugins/PluginRepositoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Plugins/PluginRepositoryTests.cs
index 83d56733..0730c42e 100644
--- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Plugins/PluginRepositoryTests.cs
+++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Plugins/PluginRepositoryTests.cs
@@ -21,7 +21,7 @@ public class PluginRepositoryTests
{
private readonly LuminaDbContext _mockContext;
private readonly PluginRepository _sut;
- private readonly PluginEntityFixture _pluginFixture;
+ private readonly PluginEntityFixture _pluginFixture = new();
///
/// Initializes a new instance of the class.
@@ -30,7 +30,6 @@ public class PluginRepositoryTests
{
_mockContext = Create.MockedDbContextFor();
_sut = new PluginRepository(_mockContext);
- _pluginFixture = new PluginEntityFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Users/UserRepositoryTests.cs b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Users/UserRepositoryTests.cs
index 0398b656..2595091e 100644
--- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Users/UserRepositoryTests.cs
+++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Core/Repositories/Users/UserRepositoryTests.cs
@@ -28,8 +28,8 @@ public class UserRepositoryTests
{
private readonly LuminaDbContext _mockContext;
private readonly UserRepository _sut;
- private readonly UserEntityFixture _userEntityFixture;
- private readonly PermissionEntityFixture _permissionEntityFixture;
+ private readonly UserEntityFixture _userEntityFixture = new();
+ private readonly PermissionEntityFixture _permissionEntityFixture = new();
///
/// Initializes a new instance of the class.
@@ -38,8 +38,6 @@ public class UserRepositoryTests
{
_mockContext = Create.MockedDbContextFor();
_sut = new UserRepository(_mockContext);
- _userEntityFixture = new UserEntityFixture();
- _permissionEntityFixture = new PermissionEntityFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/FileSystemItemTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/FileSystemItemTests.cs
index 92737b2c..1459c1c1 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/FileSystemItemTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/FileSystemItemTests.cs
@@ -20,7 +20,7 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate;
public class FileSystemItemTests
{
private readonly IFixture _fixture;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
///
/// Initializes a new instance of the class.
@@ -28,7 +28,6 @@ public class FileSystemItemTests
public FileSystemItemTests()
{
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/DirectoryProviderServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/DirectoryProviderServiceTests.cs
index c7050927..a16ea31f 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/DirectoryProviderServiceTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/DirectoryProviderServiceTests.cs
@@ -31,7 +31,7 @@ public class DirectoryProviderServiceTests
private readonly IFileSystem _mockFileSystem;
private readonly IFileSystemPermissionsService _mockFileSystemPermissionsService;
private readonly DirectoryProviderService _sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
private static readonly bool s_isUnix = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
private readonly string _pathSource = s_isUnix ? "/Source" : @"C:\Source";
private readonly string _pathSourceSubDir = s_isUnix ? "/Source/SubDir" : @"C:\Source\SubDir";
@@ -65,7 +65,6 @@ public class DirectoryProviderServiceTests
_mockFileSystem = Substitute.For();
_mockFileSystemPermissionsService = Substitute.For();
_sut = new DirectoryProviderService(_mockFileSystem, _mockFileSystemPermissionsService);
- _fileSystemPathIdFixture = new();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/DirectoryServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/DirectoryServiceTests.cs
index 260c41af..a77b3dc2 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/DirectoryServiceTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/DirectoryServiceTests.cs
@@ -30,8 +30,8 @@ public class DirectoryServiceTests
private readonly IPlatformContextManager _mockPlatformContextManager;
private readonly IPlatformContext _mockPlatformContext;
private readonly DirectoryService _sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
- private readonly DirectoryFixture _directoryFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
+ private readonly DirectoryFixture _directoryFixture = new();
private static readonly bool s_isUnix = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
private readonly string _pathDirTest = s_isUnix ? "/TestDir" : @"C:\TestDir";
private readonly string _pathDirTestSubDir1 = s_isUnix ? "/TestDir/Sub1" : @"C:\TestDir\Sub1";
@@ -47,8 +47,6 @@ public class DirectoryServiceTests
_mockPlatformContext = Substitute.For();
_mockPlatformContextManager.GetCurrentContext().Returns(_mockPlatformContext);
_sut = new DirectoryService(_mockEnvironmentContext, _mockPlatformContextManager);
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
- _directoryFixture = new DirectoryFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileProviderServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileProviderServiceTests.cs
index 34665e3b..c9eb9b37 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileProviderServiceTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileProviderServiceTests.cs
@@ -30,7 +30,7 @@ public class FileProviderServiceTests
private readonly IFileSystem _mockFileSystem;
private readonly IFileSystemPermissionsService _mockFileSystemPermissionsService;
private readonly FileProviderService _sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
private static readonly bool s_isUnix = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
private readonly string _pathVisible1 = s_isUnix ? "/Visible.txt" : @"C:\Visible.txt";
private readonly string _pathHidden1 = s_isUnix ? "/Hidden.txt" : @"C:\Hidden.txt";
@@ -50,7 +50,6 @@ public class FileProviderServiceTests
_mockFileSystem = Substitute.For();
_mockFileSystemPermissionsService = Substitute.For();
_sut = new FileProviderService(_mockFileSystem, _mockFileSystemPermissionsService);
- _fileSystemPathIdFixture = new();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileServiceTests.cs
index 18484234..ee26858a 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileServiceTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileServiceTests.cs
@@ -30,8 +30,8 @@ public class FileServiceTests
private readonly IPlatformContextManager _mockPlatformContextManager;
private readonly IPlatformContext _mockPlatformContext;
private readonly FileService _sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
- private readonly FileFixture _fileFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
+ private readonly FileFixture _fileFixture = new();
private static readonly bool s_isUnix = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
private readonly string _pathTestDir = s_isUnix ? "/TestDir" : @"C:\TestDir";
private readonly string _pathTestDirFile1 = s_isUnix ? "/TestDir/File1.txt" : @"C:\TestDir\File1.txt";
@@ -57,8 +57,6 @@ public class FileServiceTests
_mockPlatformContext = Substitute.For();
_mockPlatformContextManager.GetCurrentContext().Returns(_mockPlatformContext);
_sut = new FileService(_mockEnvironmentContext, _mockPlatformContextManager);
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
- _fileFixture = new FileFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileTypeServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileTypeServiceTests.cs
index aa581dbd..389c40d3 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileTypeServiceTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/FileTypeServiceTests.cs
@@ -29,8 +29,8 @@ public class FileTypeServiceTests
private MockFileSystem _mockFileSystem = null!;
private readonly IFileSystemPermissionsService _mockFileSystemPermissionsService;
private FileTypeService? sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
- private readonly FileFixture _fileFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
+ private readonly FileFixture _fileFixture = new();
///
/// Initializes a new instance of the class.
@@ -38,8 +38,6 @@ public class FileTypeServiceTests
public FileTypeServiceTests()
{
_mockFileSystemPermissionsService = Substitute.For();
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
- _fileFixture = new FileFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/PathServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/PathServiceTests.cs
index 7dceab93..a630f233 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/PathServiceTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/PathServiceTests.cs
@@ -24,8 +24,8 @@ public class PathServiceTests
private readonly IPlatformContext _mockPlatformContext;
private readonly IPathStrategy _mockPathStrategy;
private readonly PathService _sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
- private readonly PathSegmentFixture _pathSegmentFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
+ private readonly PathSegmentFixture _pathSegmentFixture = new();
///
/// Initializes a new instance of the class.
@@ -38,8 +38,6 @@ public class PathServiceTests
_mockPlatformContext.PathStrategy.Returns(_mockPathStrategy);
_mockPlatformContextManager.GetCurrentContext().Returns(_mockPlatformContext);
_sut = new PathService(_mockPlatformContextManager);
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
- _pathSegmentFixture = new PathSegmentFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/ThumbnailServiceTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/ThumbnailServiceTests.cs
index 35b907f9..26af77a1 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/ThumbnailServiceTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Services/ThumbnailServiceTests.cs
@@ -27,7 +27,7 @@ public class ThumbnailServiceTests
{
private readonly IEnvironmentContext _mockEnvironmentContext;
private readonly ThumbnailService _sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
///
/// Initializes a new instance of the class.
@@ -36,7 +36,6 @@ public class ThumbnailServiceTests
{
_mockEnvironmentContext = Substitute.For();
_sut = new ThumbnailService(_mockEnvironmentContext);
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Strategies/Path/UnixPathStrategyTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Strategies/Path/UnixPathStrategyTests.cs
index 70513ba7..46e49a60 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Strategies/Path/UnixPathStrategyTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Strategies/Path/UnixPathStrategyTests.cs
@@ -21,8 +21,8 @@ public class UnixPathStrategyTests
{
private readonly IFileSystem _mockFileSystem;
private readonly UnixPathStrategy _sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
- private readonly PathSegmentFixture _pathSegmentFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
+ private readonly PathSegmentFixture _pathSegmentFixture = new();
///
/// Initializes a new instance of the class.
@@ -31,8 +31,6 @@ public class UnixPathStrategyTests
{
_mockFileSystem = Substitute.For();
_sut = new UnixPathStrategy(_mockFileSystem);
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
- _pathSegmentFixture = new PathSegmentFixture();
}
[Theory]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Strategies/Path/WindowsPathStrategyTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Strategies/Path/WindowsPathStrategyTests.cs
index fd1ff389..ce3ac698 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Strategies/Path/WindowsPathStrategyTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/Strategies/Path/WindowsPathStrategyTests.cs
@@ -21,8 +21,8 @@ public class WindowsPathStrategyTests
{
private readonly IFileSystem _mockFileSystem;
private readonly WindowsPathStrategy _sut;
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
- private readonly PathSegmentFixture _pathSegmentFixture;
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
+ private readonly PathSegmentFixture _pathSegmentFixture = new();
///
/// Initializes a new instance of the class.
@@ -31,8 +31,6 @@ public class WindowsPathStrategyTests
{
_mockFileSystem = Substitute.For();
_sut = new WindowsPathStrategy(_mockFileSystem);
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
- _pathSegmentFixture = new PathSegmentFixture();
}
[Theory]
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/FileSystemPathIdTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/FileSystemPathIdTests.cs
index 2cae923d..0e967b42 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/FileSystemPathIdTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/FileSystemPathIdTests.cs
@@ -14,15 +14,7 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.
[ExcludeFromCodeCoverage]
public class FileSystemPathIdTests
{
- private readonly FileSystemPathIdFixture _fileSystemPathIdFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public FileSystemPathIdTests()
- {
- _fileSystemPathIdFixture = new FileSystemPathIdFixture();
- }
+ private readonly FileSystemPathIdFixture _fileSystemPathIdFixture = new();
[Fact]
public void Create_WithValidPath_ShouldReturnFileSystemPathId()
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/PathSegmentTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/PathSegmentTests.cs
index cda79829..d0c7575a 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/PathSegmentTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/PathSegmentTests.cs
@@ -14,15 +14,7 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.
[ExcludeFromCodeCoverage]
public class PathSegmentTests
{
- private readonly PathSegmentFixture _pathSegmentFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public PathSegmentTests()
- {
- _pathSegmentFixture = new PathSegmentFixture();
- }
+ private readonly PathSegmentFixture _pathSegmentFixture = new();
[Fact]
public void Create_WithValidInput_ShouldReturnPathSegment()
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/StreamInfoTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/StreamInfoTests.cs
index 4e10431a..8fe82ade 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/StreamInfoTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/StreamInfoTests.cs
@@ -15,15 +15,7 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.
[ExcludeFromCodeCoverage]
public class StreamInfoTests
{
- private readonly StreamInfoFixture _streamInfoFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public StreamInfoTests()
- {
- _streamInfoFixture = new StreamInfoFixture();
- }
+ private readonly StreamInfoFixture _streamInfoFixture = new();
[Fact]
public void Create_WithValidInput_ShouldReturnStreamInfo()
diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/ThumbnailTests.cs b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/ThumbnailTests.cs
index 866405ad..5c218610 100644
--- a/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/ThumbnailTests.cs
+++ b/tests/UnitTests/Lumina.Domain.UnitTests/Core/Aggregates/FileSystemManagementAggregate/ValueObjects/ThumbnailTests.cs
@@ -16,15 +16,7 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileSystemManagementAggregate.
[ExcludeFromCodeCoverage]
public class ThumbnailTests
{
- private readonly ThumbnailFixture _thumbnailFixture;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ThumbnailTests()
- {
- _thumbnailFixture = new ThumbnailFixture();
- }
+ private readonly ThumbnailFixture _thumbnailFixture = new();
[Fact]
public void Constructor_WhenCalled_ShouldSetPropertiesCorrectly()
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/CommonSettingsDtoValidatorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/CommonSettingsDtoValidatorTests.cs
index d41b6411..c34206bc 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/CommonSettingsDtoValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/CommonSettingsDtoValidatorTests.cs
@@ -17,7 +17,7 @@ namespace Lumina.Infrastructure.UnitTests.Common.Validators;
[ExcludeFromCodeCoverage]
public class CommonSettingsDtoValidatorTests
{
- private readonly CommonSettingsDtoValidator _validator;
+ private readonly CommonSettingsDtoValidator _validator = new();
private readonly IFixture _fixture;
///
@@ -26,7 +26,6 @@ public class CommonSettingsDtoValidatorTests
public CommonSettingsDtoValidatorTests()
{
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
- _validator = new();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/DatabaseSettingsDtoValidatorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/DatabaseSettingsDtoValidatorTests.cs
index cf80f2e2..489b9e5f 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/DatabaseSettingsDtoValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/DatabaseSettingsDtoValidatorTests.cs
@@ -17,7 +17,7 @@ namespace Lumina.Infrastructure.UnitTests.Common.Validators;
[ExcludeFromCodeCoverage]
public class DatabaseSettingsDtoValidatorTests
{
- private readonly DatabaseSettingsDtoValidator _validator;
+ private readonly DatabaseSettingsDtoValidator _validator = new();
private readonly IFixture _fixture;
///
@@ -26,7 +26,6 @@ public class DatabaseSettingsDtoValidatorTests
public DatabaseSettingsDtoValidatorTests()
{
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
- _validator = new();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/EncryptionSettingsDtoValidatorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/EncryptionSettingsDtoValidatorTests.cs
index aae59a10..10a8186d 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/EncryptionSettingsDtoValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/EncryptionSettingsDtoValidatorTests.cs
@@ -17,7 +17,7 @@ namespace Lumina.Infrastructure.UnitTests.Common.Validators;
[ExcludeFromCodeCoverage]
public class EncryptionSettingsDtoValidatorTests
{
- private readonly EncryptionSettingsDtoValidator _validator;
+ private readonly EncryptionSettingsDtoValidator _validator = new();
private readonly IFixture _fixture;
///
@@ -26,7 +26,6 @@ public class EncryptionSettingsDtoValidatorTests
public EncryptionSettingsDtoValidatorTests()
{
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
- _validator = new();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/JwtSettingsDtoValidatorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/JwtSettingsDtoValidatorTests.cs
index 01b14622..1391eb22 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/JwtSettingsDtoValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/JwtSettingsDtoValidatorTests.cs
@@ -17,7 +17,7 @@ namespace Lumina.Infrastructure.UnitTests.Common.Validators;
[ExcludeFromCodeCoverage]
public class JwtSettingsDtoValidatorTests
{
- private readonly JwtSettingsDtoValidator _validator;
+ private readonly JwtSettingsDtoValidator _validator = new();
private readonly IFixture _fixture;
///
@@ -26,7 +26,6 @@ public class JwtSettingsDtoValidatorTests
public JwtSettingsDtoValidatorTests()
{
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
- _validator = new();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/MediaSettingsDtoValidatorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/MediaSettingsDtoValidatorTests.cs
index d7c19f9f..195e56a5 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/MediaSettingsDtoValidatorTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Common/Validators/MediaSettingsDtoValidatorTests.cs
@@ -17,7 +17,7 @@ namespace Lumina.Infrastructure.UnitTests.Common.Validators;
[ExcludeFromCodeCoverage]
public class MediaSettingsDtoValidatorTests
{
- private readonly MediaSettingsDtoValidator _validator;
+ private readonly MediaSettingsDtoValidator _validator = new();
private readonly IFixture _fixture;
///
@@ -26,7 +26,6 @@ public class MediaSettingsDtoValidatorTests
public MediaSettingsDtoValidatorTests()
{
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
- _validator = new();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/QRCodeGeneratorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/QRCodeGeneratorTests.cs
index 59f4bd32..3bbc5912 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/QRCodeGeneratorTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/QRCodeGeneratorTests.cs
@@ -13,15 +13,7 @@ namespace Lumina.Infrastructure.UnitTests.Core.Authentication;
[ExcludeFromCodeCoverage]
public class QRCodeGeneratorTests
{
- private readonly QRCodeGenerator _sut;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public QRCodeGeneratorTests()
- {
- _sut = new QRCodeGenerator();
- }
+ private readonly QRCodeGenerator _sut = new();
[Fact]
public void GenerateQrCodeDataUri_WhenCalled_ShouldReturnValidDataUri()
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/TokenGeneratorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/TokenGeneratorTests.cs
index 6ac19cde..b6f6ea42 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/TokenGeneratorTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/TokenGeneratorTests.cs
@@ -11,15 +11,7 @@ namespace Lumina.Infrastructure.UnitTests.Core.Authentication;
[ExcludeFromCodeCoverage]
public class TokenGeneratorTests
{
- private readonly TokenGenerator _sut;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public TokenGeneratorTests()
- {
- _sut = new TokenGenerator();
- }
+ private readonly TokenGenerator _sut = new();
[Fact]
public void GenerateToken_WhenCalled_ShouldGenerateNonEmptyToken()
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/TotpTokenGeneratorTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/TotpTokenGeneratorTests.cs
index fc8adccc..72dfe00b 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/TotpTokenGeneratorTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Authentication/TotpTokenGeneratorTests.cs
@@ -12,15 +12,7 @@ namespace Lumina.Infrastructure.UnitTests.Core.Authentication;
[ExcludeFromCodeCoverage]
public class TotpTokenGeneratorTests
{
- private readonly TotpTokenGenerator _sut;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public TotpTokenGeneratorTests()
- {
- _sut = new TotpTokenGenerator();
- }
+ private readonly TotpTokenGenerator _sut = new();
[Fact]
public void GenerateSecret_WhenCalled_ShouldGenerateNonEmptySecret()
diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Security/HashServiceTests.cs b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Security/HashServiceTests.cs
index de079de3..72599e89 100644
--- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Security/HashServiceTests.cs
+++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Core/Security/HashServiceTests.cs
@@ -12,15 +12,7 @@ namespace Lumina.Infrastructure.UnitTests.Core.Security;
[ExcludeFromCodeCoverage]
public class HashServiceTests
{
- private readonly PasswordHashService _sut;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public HashServiceTests()
- {
- _sut = new PasswordHashService();
- }
+ private readonly PasswordHashService _sut = new();
[Fact]
public void HashString_WhenCalled_ShouldReturnNonEmptyHash()
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Directories/GetDirectoriesEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Directories/GetDirectoriesEndpointTests.cs
index 457f3178..01355311 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Directories/GetDirectoriesEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Directories/GetDirectoriesEndpointTests.cs
@@ -29,8 +29,8 @@ public class GetDirectoriesEndpointTests
{
private readonly IQueryHandler>> _mockHandler;
private readonly GetDirectoriesEndpoint _sut;
- private readonly GetDirectoriesRequestFixture _getDirectoriesRequestFixture;
- private readonly DirectoryResponseFixture _directoryResponseFixture;
+ private readonly GetDirectoriesRequestFixture _getDirectoriesRequestFixture = new();
+ private readonly DirectoryResponseFixture _directoryResponseFixture = new();
///
/// Initializes a new instance of the class.
@@ -38,8 +38,6 @@ public class GetDirectoriesEndpointTests
public GetDirectoriesEndpointTests()
{
_mockHandler = Substitute.For>>>();
- _getDirectoriesRequestFixture = new GetDirectoriesRequestFixture();
- _directoryResponseFixture = new DirectoryResponseFixture();
_sut = Factory.Create(_mockHandler);
}
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Drives/GetDrivesEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Drives/GetDrivesEndpointTests.cs
index b5da85d2..61619e12 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Drives/GetDrivesEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Drives/GetDrivesEndpointTests.cs
@@ -27,7 +27,7 @@ public class GetDrivesEndpointTests
{
private readonly IQueryHandler>> _mockHandler;
private readonly GetDrivesEndpoint _sut;
- private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture;
+ private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture = new();
///
/// Initializes a new instance of the class.
@@ -35,7 +35,6 @@ public class GetDrivesEndpointTests
public GetDrivesEndpointTests()
{
_mockHandler = Substitute.For>>>();
- _fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture();
_sut = Factory.Create(_mockHandler);
}
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Files/GetFilesEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Files/GetFilesEndpointTests.cs
index 2ccfffc4..04e95ae8 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Files/GetFilesEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Files/GetFilesEndpointTests.cs
@@ -29,8 +29,8 @@ public class GetFilesEndpointTests
{
private readonly IQueryHandler>> _mockHandler;
private readonly GetFilesEndpoint _sut;
- private readonly GetFilesRequestFixture _getFilesRequestFixture;
- private readonly FileResponseFixture _fileResponseFixture;
+ private readonly GetFilesRequestFixture _getFilesRequestFixture = new();
+ private readonly FileResponseFixture _fileResponseFixture = new();
///
/// Initializes a new instance of the class.
@@ -38,8 +38,6 @@ public class GetFilesEndpointTests
public GetFilesEndpointTests()
{
_mockHandler = Substitute.For>>>();
- _getFilesRequestFixture = new GetFilesRequestFixture();
- _fileResponseFixture = new FileResponseFixture();
_sut = Factory.Create(_mockHandler);
}
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Files/GetTreeFilesEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Files/GetTreeFilesEndpointTests.cs
index c49f27af..4f6d6440 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Files/GetTreeFilesEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Files/GetTreeFilesEndpointTests.cs
@@ -29,8 +29,8 @@ public class GetTreeFilesEndpointTests
{
private readonly IQueryHandler>> _mockHandler;
private readonly GetTreeFilesEndpoint _sut;
- private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture;
- private readonly GetTreeFilesRequestFixture _getTreeFilesRequestFixture;
+ private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture = new();
+ private readonly GetTreeFilesRequestFixture _getTreeFilesRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -38,8 +38,6 @@ public class GetTreeFilesEndpointTests
public GetTreeFilesEndpointTests()
{
_mockHandler = Substitute.For>>>();
- _fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture();
- _getTreeFilesRequestFixture = new GetTreeFilesRequestFixture();
_sut = Factory.Create(_mockHandler);
}
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/CheckPathExistsEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/CheckPathExistsEndpointTests.cs
index f081ebf6..a8e555e9 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/CheckPathExistsEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/CheckPathExistsEndpointTests.cs
@@ -26,7 +26,7 @@ public class CheckPathExistsEndpointTests
{
private readonly IQueryHandler> _mockHandler;
private readonly CheckPathExistsEndpoint _sut;
- private readonly CheckPathExistsRequestFixture _checkPathExistsRequestFixture;
+ private readonly CheckPathExistsRequestFixture _checkPathExistsRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -35,7 +35,6 @@ public class CheckPathExistsEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = Factory.Create(_mockHandler);
- _checkPathExistsRequestFixture = new CheckPathExistsRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/CombinePathEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/CombinePathEndpointTests.cs
index 0506c3db..e46be9e1 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/CombinePathEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/CombinePathEndpointTests.cs
@@ -26,8 +26,8 @@ public class CombinePathEndpointTests
{
private readonly ICommandHandler> _mockHandler;
private readonly CombinePathEndpoint _sut;
- private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
- private readonly CombinePathRequestFixture _combinePathRequestFixture;
+ private readonly PathSegmentResponseFixture _pathSegmentResponseFixture = new();
+ private readonly CombinePathRequestFixture _combinePathRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -36,8 +36,6 @@ public class CombinePathEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = FastEndpoints.Factory.Create(_mockHandler);
- _pathSegmentResponseFixture = new PathSegmentResponseFixture();
- _combinePathRequestFixture = new CombinePathRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathParentEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathParentEndpointTests.cs
index f4afb228..12f46f8f 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathParentEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathParentEndpointTests.cs
@@ -29,8 +29,8 @@ public class GetPathParentEndpointTests
{
private readonly IQueryHandler>> _mockHandler;
private readonly GetPathParentEndpoint _sut;
- private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
- private readonly GetPathParentRequestFixture _getPathParentRequestFixture;
+ private readonly PathSegmentResponseFixture _pathSegmentResponseFixture = new();
+ private readonly GetPathParentRequestFixture _getPathParentRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -39,8 +39,6 @@ public class GetPathParentEndpointTests
{
_mockHandler = Substitute.For>>>();
_sut = Factory.Create(_mockHandler);
- _pathSegmentResponseFixture = new PathSegmentResponseFixture();
- _getPathParentRequestFixture = new GetPathParentRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathRootEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathRootEndpointTests.cs
index 511b299e..114649d4 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathRootEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathRootEndpointTests.cs
@@ -27,8 +27,8 @@ public class GetPathRootEndpointTests
{
private readonly IQueryHandler> _mockHandler;
private readonly GetPathRootEndpoint _sut;
- private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
- private readonly GetPathRootRequestFixture _getPathRootRequestFixture;
+ private readonly PathSegmentResponseFixture _pathSegmentResponseFixture = new();
+ private readonly GetPathRootRequestFixture _getPathRootRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -37,8 +37,6 @@ public class GetPathRootEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = Factory.Create(_mockHandler);
- _pathSegmentResponseFixture = new PathSegmentResponseFixture();
- _getPathRootRequestFixture = new GetPathRootRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathSeparatorEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathSeparatorEndpointTests.cs
index 0d09a41d..a6d471ce 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathSeparatorEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/GetPathSeparatorEndpointTests.cs
@@ -24,7 +24,7 @@ public class GetPathSeparatorEndpointTests
{
private readonly IQueryHandler _mockHandler;
private readonly GetPathSeparatorEndpoint _sut;
- private readonly PathSeparatorResponseFixture _pathSeparatorResponseFixture;
+ private readonly PathSeparatorResponseFixture _pathSeparatorResponseFixture = new();
///
/// Initializes a new instance of the class.
@@ -33,7 +33,6 @@ public class GetPathSeparatorEndpointTests
{
_mockHandler = Substitute.For>();
_sut = Factory.Create(_mockHandler);
- _pathSeparatorResponseFixture = new PathSeparatorResponseFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/SplitPathEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/SplitPathEndpointTests.cs
index 82b38f19..26e8ec27 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/SplitPathEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/SplitPathEndpointTests.cs
@@ -28,8 +28,8 @@ public class SplitPathEndpointTests
{
private readonly ICommandHandler>> _mockHandler;
private readonly SplitPathEndpoint _sut;
- private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
- private readonly SplitPathRequestFixture _splitPathRequestFixture;
+ private readonly PathSegmentResponseFixture _pathSegmentResponseFixture = new();
+ private readonly SplitPathRequestFixture _splitPathRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -38,8 +38,6 @@ public class SplitPathEndpointTests
{
_mockHandler = Substitute.For>>>();
_sut = FastEndpoints.Factory.Create(_mockHandler);
- _pathSegmentResponseFixture = new PathSegmentResponseFixture();
- _splitPathRequestFixture = new SplitPathRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/ValidatePathEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/ValidatePathEndpointTests.cs
index 0b2bb1ba..530fb3a3 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/ValidatePathEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Path/ValidatePathEndpointTests.cs
@@ -26,7 +26,7 @@ public class ValidatePathEndpointTests
{
private readonly IQueryHandler> _mockHandler;
private readonly ValidatePathEndpoint _sut;
- private readonly ValidatePathRequestFixture _validatePathRequestFixture;
+ private readonly ValidatePathRequestFixture _validatePathRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -35,7 +35,6 @@ public class ValidatePathEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = Factory.Create(_mockHandler);
- _validatePathRequestFixture = new ValidatePathRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Thumbnails/GetThumbnailEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Thumbnails/GetThumbnailEndpointTests.cs
index 313ed522..689fb0f5 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Thumbnails/GetThumbnailEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/FileSystemManagement/Thumbnails/GetThumbnailEndpointTests.cs
@@ -28,8 +28,8 @@ public class GetThumbnailEndpointTests
{
private readonly IQueryHandler> _mockHandler;
private readonly GetThumbnailEndpoint _sut;
- private readonly GetThumbnailRequestFixture _getThumbnailRequestFixture;
- private readonly ThumbnailResponseFixture _thumbnailResponseFixture;
+ private readonly GetThumbnailRequestFixture _getThumbnailRequestFixture = new();
+ private readonly ThumbnailResponseFixture _thumbnailResponseFixture = new();
///
/// Initializes a new instance of the class.
@@ -38,8 +38,6 @@ public class GetThumbnailEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = Factory.Create(_mockHandler);
- _getThumbnailRequestFixture = new GetThumbnailRequestFixture();
- _thumbnailResponseFixture = new ThumbnailResponseFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/Maintenance/ApplicationSetup/SetupApplicationEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/Maintenance/ApplicationSetup/SetupApplicationEndpointTests.cs
index 271a4394..b6077b29 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/Maintenance/ApplicationSetup/SetupApplicationEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/Maintenance/ApplicationSetup/SetupApplicationEndpointTests.cs
@@ -25,7 +25,7 @@ public class SetupApplicationEndpointTests
{
private readonly ICommandHandler> _mockHandler;
private readonly SetupApplicationEndpoint _sut;
- private readonly RegistrationRequestFixture _registrationRequestFixture;
+ private readonly RegistrationRequestFixture _registrationRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -34,7 +34,6 @@ public class SetupApplicationEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = FastEndpoints.Factory.Create(_mockHandler);
- _registrationRequestFixture = new RegistrationRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpointTests.cs
index a674f93b..6351bd06 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpointTests.cs
@@ -25,7 +25,7 @@ public class ChangePasswordEndpointTests
{
private readonly ICommandHandler> _mockHandler;
private readonly ChangePasswordEndpoint _sut;
- private readonly ChangePasswordRequestFixture _changePasswordRequestFixture;
+ private readonly ChangePasswordRequestFixture _changePasswordRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -34,7 +34,6 @@ public class ChangePasswordEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = FastEndpoints.Factory.Create(_mockHandler);
- _changePasswordRequestFixture = new ChangePasswordRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpointTests.cs
index 7a4c6170..fde135ee 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpointTests.cs
@@ -26,7 +26,7 @@ public class LoginEndpointTests
{
private readonly IQueryHandler> _mockHandler;
private readonly LoginEndpoint _sut;
- private readonly LoginRequestFixture _loginRequestFixture;
+ private readonly LoginRequestFixture _loginRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -35,7 +35,6 @@ public class LoginEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = Factory.Create(_mockHandler);
- _loginRequestFixture = new LoginRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/RecoverPassword/RecoverPasswordEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/RecoverPassword/RecoverPasswordEndpointTests.cs
index ec7da636..79250010 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/RecoverPassword/RecoverPasswordEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/RecoverPassword/RecoverPasswordEndpointTests.cs
@@ -25,7 +25,7 @@ public class RecoverPasswordEndpointTests
{
private readonly ICommandHandler> _mockHandler;
private readonly RecoverPasswordEndpoint _sut;
- private readonly RecoverPasswordRequestFixture _recoverPasswordRequestFixture;
+ private readonly RecoverPasswordRequestFixture _recoverPasswordRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -34,7 +34,6 @@ public class RecoverPasswordEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = FastEndpoints.Factory.Create(_mockHandler);
- _recoverPasswordRequestFixture = new RecoverPasswordRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/Register/RegisterEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/Register/RegisterEndpointTests.cs
index 546f00c6..f7a8184c 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/Register/RegisterEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authentication/Register/RegisterEndpointTests.cs
@@ -25,7 +25,7 @@ public class RegisterEndpointTests
{
private readonly ICommandHandler> _mockHandler;
private readonly RegisterEndpoint _sut;
- private readonly RegistrationRequestFixture _registrationRequestFixture;
+ private readonly RegistrationRequestFixture _registrationRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -34,7 +34,6 @@ public class RegisterEndpointTests
{
_mockHandler = Substitute.For>>();
_sut = FastEndpoints.Factory.Create(_mockHandler);
- _registrationRequestFixture = new RegistrationRequestFixture();
}
[Fact]
diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authorization/GetAuthorization/GetAuthorizationEndpointTests.cs b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authorization/GetAuthorization/GetAuthorizationEndpointTests.cs
index a8d10117..cb9bfaa0 100644
--- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authorization/GetAuthorization/GetAuthorizationEndpointTests.cs
+++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Core/Endpoints/UsersManagement/Authorization/GetAuthorization/GetAuthorizationEndpointTests.cs
@@ -29,7 +29,7 @@ public class GetAuthorizationEndpointTests
{
private readonly IQueryHandler> _mockHandler;
private readonly GetAuthorizationEndpoint _sut;
- private readonly GetAuthorizationRequestFixture _getAuthorizationRequestFixture;
+ private readonly GetAuthorizationRequestFixture _getAuthorizationRequestFixture = new();
///
/// Initializes a new instance of the class.
@@ -37,7 +37,6 @@ public class GetAuthorizationEndpointTests
public GetAuthorizationEndpointTests()
{
_mockHandler = Substitute.For>>();
- _getAuthorizationRequestFixture = new GetAuthorizationRequestFixture();
_sut = Factory.Create(_mockHandler);
}