mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Aligns the test fixture field names with their types and tidies the remaining tests
This commit is contained in:
1 parent
95e771191e
commit
a514335a10
99 files changed
+1523
-1499
No files matched your search
+4
-2
@@ -27,6 +27,7 @@ public class BookMetadataLookupDtoFixture
|
||||
/// <param name="title">Optional. The title of the book.</param>
|
||||
/// <param name="author">Optional. The author of the book.</param>
|
||||
/// <param name="languageCode">Optional. The language code of the book.</param>
|
||||
/// <param name="includePath">Whether the path should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <returns>The created <see cref="BookMetadataLookupDto"/>.</returns>
|
||||
public BookMetadataLookupDto Create(
|
||||
Guid? libraryId = null,
|
||||
@@ -35,11 +36,12 @@ public class BookMetadataLookupDtoFixture
|
||||
string? openLibraryId = null,
|
||||
string? title = null,
|
||||
string? author = null,
|
||||
string? languageCode = null)
|
||||
string? languageCode = null,
|
||||
bool includePath = true)
|
||||
{
|
||||
return new BookMetadataLookupDto(
|
||||
libraryId ?? Guid.NewGuid(),
|
||||
path ?? _faker.System.FilePath(),
|
||||
includePath ? (path ?? _faker.System.FilePath()) : null!,
|
||||
isbn,
|
||||
openLibraryId,
|
||||
title,
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ namespace Lumina.Contracts.Fixtures.Core.Responses.FileSystemManagement.Director
|
||||
public class DirectoryResponseFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
private readonly FileSystemItemDtoFixture _fileSystemItemModelFixture = new();
|
||||
private readonly FileSystemItemDtoFixture _fileSystemItemDtoFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="DirectoryResponse"/>.
|
||||
@@ -30,7 +30,7 @@ public class DirectoryResponseFixture
|
||||
_faker.System.FileName(),
|
||||
_faker.Date.Past(),
|
||||
_faker.Date.Recent(),
|
||||
_fileSystemItemModelFixture.CreateMany(itemCount)
|
||||
_fileSystemItemDtoFixture.CreateMany(itemCount)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ namespace Lumina.Plugins.OpenLibrary.Fixtures.Common.Models.Contracts.Responses;
|
||||
[ExcludeFromCodeCoverage]
|
||||
internal class OpenLibraryRatingsResponseFixture
|
||||
{
|
||||
private readonly OpenLibraryRatingSummaryResponseFixture _ratingSummaryResponseFixture = new();
|
||||
private readonly OpenLibraryRatingSummaryResponseFixture _openLibraryRatingSummaryResponseFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="OpenLibraryRatingsResponse"/>.
|
||||
@@ -22,7 +22,7 @@ internal class OpenLibraryRatingsResponseFixture
|
||||
{
|
||||
return new OpenLibraryRatingsResponse
|
||||
{
|
||||
Summary = summary ?? _ratingSummaryResponseFixture.Create()
|
||||
Summary = summary ?? _openLibraryRatingSummaryResponseFixture.Create()
|
||||
};
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -13,7 +13,7 @@ namespace Lumina.Plugins.OpenLibrary.Fixtures.Common.Models.Contracts.Responses;
|
||||
internal class OpenLibraryWorkAuthorResponseFixture
|
||||
{
|
||||
private readonly Faker _faker = new();
|
||||
private readonly OpenLibraryKeyReferenceResponseFixture _keyReferenceResponseFixture = new();
|
||||
private readonly OpenLibraryKeyReferenceResponseFixture _openLibraryKeyReferenceResponseFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="OpenLibraryWorkAuthorResponse"/>.
|
||||
@@ -27,7 +27,7 @@ internal class OpenLibraryWorkAuthorResponseFixture
|
||||
{
|
||||
return new OpenLibraryWorkAuthorResponse
|
||||
{
|
||||
Author = author ?? _keyReferenceResponseFixture.Create(key: $"/authors/OL{_faker.Random.Number(1000, 9999)}A"),
|
||||
Author = author ?? _openLibraryKeyReferenceResponseFixture.Create(key: $"/authors/OL{_faker.Random.Number(1000, 9999)}A"),
|
||||
Key = key
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user