mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11:11:10 +00:00
Inlines fixtures instantiation.
This commit is contained in:
1 parent
b648e2f054
commit
59e16d645a
147 files changed
+190
-898
No files matched your search
+1
-9
@@ -15,15 +15,7 @@ namespace Lumina.Application.Fixtures.Common.DataAccess.Entities.Authorization;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RolePermissionEntityFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RolePermissionEntityFixture"/> class.
|
||||
/// </summary>
|
||||
public RolePermissionEntityFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="RolePermissionEntity"/>.
|
||||
|
||||
+1
-9
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BookEntityFixture"/> class.
|
||||
/// </summary>
|
||||
public BookEntityFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="BookEntity"/>.
|
||||
|
||||
+1
-9
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BookRatingEntityFixture"/> class.
|
||||
/// </summary>
|
||||
public BookRatingEntityFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="BookRatingEntity"/>.
|
||||
|
||||
+2
-4
@@ -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();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AddBookCommandFixture"/> class.
|
||||
/// </summary>
|
||||
public AddBookCommandFixture()
|
||||
{
|
||||
_fixture = new Fixture();
|
||||
_fixture.Customizations.Add(new DateOnlySpecimenBuilder());
|
||||
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
|
||||
_faker = new Faker();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+1
-9
@@ -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();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BookRatingDtoFixture"/> class.
|
||||
/// </summary>
|
||||
public BookRatingDtoFixture()
|
||||
{
|
||||
_fixture = new Fixture();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="BookRatingDto"/>.
|
||||
/// </summary>
|
||||
|
||||
+1
-9
@@ -14,15 +14,7 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ChangePasswordRequestFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChangePasswordRequestFixture"/> class.
|
||||
/// </summary>
|
||||
public ChangePasswordRequestFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="ChangePasswordRequest"/>.
|
||||
|
||||
+1
-9
@@ -14,15 +14,7 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class LoginRequestFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LoginRequestFixture"/> class.
|
||||
/// </summary>
|
||||
public LoginRequestFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="LoginRequest"/>.
|
||||
|
||||
+1
-9
@@ -14,15 +14,7 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RecoverPasswordRequestFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RecoverPasswordRequestFixture"/> class.
|
||||
/// </summary>
|
||||
public RecoverPasswordRequestFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="RecoverPasswordRequest"/>.
|
||||
|
||||
+1
-9
@@ -14,15 +14,7 @@ namespace Lumina.Contracts.Fixtures.Core.Requests.Authentication;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RegistrationRequestFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RegistrationRequestFixture"/> class.
|
||||
/// </summary>
|
||||
public RegistrationRequestFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="RegistrationRequest"/>.
|
||||
|
||||
+2
-4
@@ -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();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AddBookRequestFixture"/> class.
|
||||
/// </summary>
|
||||
public AddBookRequestFixture()
|
||||
{
|
||||
_fixture = new Fixture();
|
||||
_fixture.Customizations.Add(new DateOnlySpecimenBuilder());
|
||||
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
|
||||
_faker = new Faker();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+1
-9
@@ -18,15 +18,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DirectoryFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DirectoryFixture"/> class.
|
||||
/// </summary>
|
||||
public DirectoryFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="Directory"/>.
|
||||
|
||||
+1
-9
@@ -17,15 +17,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FileFixture"/> class.
|
||||
/// </summary>
|
||||
public FileFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="File"/>.
|
||||
|
||||
+1
-9
@@ -16,15 +16,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileSystemPathIdFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FileSystemPathIdFixture"/> class.
|
||||
/// </summary>
|
||||
public FileSystemPathIdFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="FileSystemPathId"/>.
|
||||
|
||||
+1
-9
@@ -16,15 +16,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PathSegmentFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PathSegmentFixture"/> class.
|
||||
/// </summary>
|
||||
public PathSegmentFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="PathSegment"/>.
|
||||
|
||||
+1
-9
@@ -16,15 +16,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class StreamInfoFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StreamInfoFixture"/> class.
|
||||
/// </summary>
|
||||
public StreamInfoFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="StreamInfo"/>.
|
||||
|
||||
+1
-9
@@ -15,15 +15,7 @@ namespace Lumina.Domain.Fixtures.Core.BoundedContexts.FileSystemManagementBounde
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ThumbnailFixture
|
||||
{
|
||||
private readonly Faker _faker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ThumbnailFixture"/> class.
|
||||
/// </summary>
|
||||
public ThumbnailFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
private readonly Faker _faker = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="Thumbnail"/>.
|
||||
|
||||
+1
-9
@@ -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();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LibraryFixture"/> class.
|
||||
/// </summary>
|
||||
public LibraryFixture()
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="Library"/> domain aggregate.
|
||||
/// </summary>
|
||||
|
||||
+3
-6
@@ -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();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BookFixture"/> class.
|
||||
/// </summary>
|
||||
public BookFixture()
|
||||
{
|
||||
_fixture = new Fixture();
|
||||
_fixture.Customizations.Add(new DateOnlySpecimenBuilder());
|
||||
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
|
||||
_isbnFixture = new IsbnFixture();
|
||||
_bookRatingFixture = new BookRatingFixture();
|
||||
ConfigureCustomDomainTypes();
|
||||
}
|
||||
|
||||
|
||||
+1
-9
@@ -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();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BookRatingFixture"/> class.
|
||||
/// </summary>
|
||||
public BookRatingFixture()
|
||||
{
|
||||
_fixture = new Fixture();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="BookRating"/>.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user