mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 19:21:10 +00:00
Adds book editing tests and parameterizes the shared test fixtures
This commit is contained in:
1 parent
1bfa07ba5d
commit
145185d715
354 files changed
+7118
-1743
No files matched your search
@@ -22,16 +22,22 @@ public class LanguageInfoDtoFixture
|
||||
/// <param name="languageCode">Optional. The ISO code of the language.</param>
|
||||
/// <param name="languageName">Optional. The name of the language in English.</param>
|
||||
/// <param name="nativeName">Optional. The native name of the language.</param>
|
||||
/// <param name="includeLanguageCode">Whether the language code should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeLanguageName">Whether the language name should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeNativeName">Whether the native name should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <returns>The created <see cref="LanguageInfoDto"/>.</returns>
|
||||
public LanguageInfoDto Create(
|
||||
string? languageCode = null,
|
||||
string? languageName = null,
|
||||
string? nativeName = null)
|
||||
string? languageCode = null,
|
||||
string? languageName = null,
|
||||
string? nativeName = null,
|
||||
bool includeLanguageCode = true,
|
||||
bool includeLanguageName = true,
|
||||
bool includeNativeName = true)
|
||||
{
|
||||
return new LanguageInfoDto(
|
||||
languageCode ?? _faker.Random.String2(2),
|
||||
languageName ?? _faker.Lorem.Word(),
|
||||
nativeName ?? _faker.Lorem.Word());
|
||||
includeLanguageCode ? (languageCode ?? _faker.Random.String2(2)) : null,
|
||||
includeLanguageName ? (languageName ?? _faker.Lorem.Word()) : null,
|
||||
includeNativeName ? (nativeName ?? _faker.Lorem.Word()) : null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Lumina.Contracts.Fixtures.Core.DTO.Common;
|
||||
public class ReleaseInfoDtoFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates an <see cref="ReleaseInfoDto"/>, preserving the values that are not provided as <see langword="null"/>.
|
||||
/// Creates a <see cref="ReleaseInfoDto"/>, preserving the values that are not provided as <see langword="null"/>.
|
||||
/// </summary>
|
||||
/// <param name="originalReleaseDate">Optional. The original release date of the content.</param>
|
||||
/// <param name="originalReleaseYear">Optional. The original release year of the content.</param>
|
||||
@@ -23,6 +23,12 @@ public class ReleaseInfoDtoFixture
|
||||
/// <param name="reReleaseYear">Optional. The re-release year of the content.</param>
|
||||
/// <param name="releaseCountry">Optional. The country where the content was released.</param>
|
||||
/// <param name="releaseVersion">Optional. The version or edition of the content's release.</param>
|
||||
/// <param name="includeOriginalReleaseDate">Whether the original release date should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeOriginalReleaseYear">Whether the original release year should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeReReleaseDate">Whether the re-release date should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeReReleaseYear">Whether the re-release year should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeReleaseCountry">Whether the release country should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <param name="includeReleaseVersion">Whether the release version should be included, or forced to <see langword="null"/>.</param>
|
||||
/// <returns>The created <see cref="ReleaseInfoDto"/>.</returns>
|
||||
public ReleaseInfoDto Create(
|
||||
DateOnly? originalReleaseDate = null,
|
||||
@@ -30,15 +36,21 @@ public class ReleaseInfoDtoFixture
|
||||
DateOnly? reReleaseDate = null,
|
||||
int? reReleaseYear = null,
|
||||
string? releaseCountry = null,
|
||||
string? releaseVersion = null)
|
||||
string? releaseVersion = null,
|
||||
bool includeOriginalReleaseDate = true,
|
||||
bool includeOriginalReleaseYear = true,
|
||||
bool includeReReleaseDate = true,
|
||||
bool includeReReleaseYear = true,
|
||||
bool includeReleaseCountry = true,
|
||||
bool includeReleaseVersion = true)
|
||||
{
|
||||
return new ReleaseInfoDto(
|
||||
originalReleaseDate,
|
||||
originalReleaseYear,
|
||||
reReleaseDate,
|
||||
reReleaseYear,
|
||||
releaseCountry,
|
||||
releaseVersion);
|
||||
includeOriginalReleaseDate ? originalReleaseDate : null,
|
||||
includeOriginalReleaseYear ? originalReleaseYear : null,
|
||||
includeReReleaseDate ? reReleaseDate : null,
|
||||
includeReReleaseYear ? reReleaseYear : null,
|
||||
includeReleaseCountry ? releaseCountry : null,
|
||||
includeReleaseVersion ? releaseVersion : null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user