Removes the umbrella include flag from the fixtures and their consumers

This commit is contained in:
BinaryAlley committed 2026-09-27 23:05:06 +03:00
1 parent ab5cbfb949
commit 4d96fe10dd
43 files changed
+930 -349

No files matched your search

@@ -419,7 +419,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenOriginalReleaseYearIsLessThan1_ShouldHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(metadata: _audioMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, 0, null, null, null, null)));
AddTrackCommand command = _addTrackCommandFixture.Create(metadata: _audioMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(originalReleaseYear: 0)));
// Act
List<Error> result = _validator.TestValidate(command);
@@ -432,7 +432,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenOriginalReleaseYearIsGreaterThan9999_ShouldHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(metadata: _audioMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, 10000, null, null, null, null)));
AddTrackCommand command = _addTrackCommandFixture.Create(metadata: _audioMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(originalReleaseYear: 10000)));
// Act
List<Error> result = _validator.TestValidate(command);
@@ -458,7 +458,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenReReleaseYearIsLessThan1_ShouldHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(metadata: _audioMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, null, null, 0, null, null)));
AddTrackCommand command = _addTrackCommandFixture.Create(metadata: _audioMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(reReleaseYear: 0)));
// Act
List<Error> result = _validator.TestValidate(command);
@@ -471,7 +471,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenReReleaseYearIsGreaterThan9999_ShouldHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(metadata: _audioMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, null, null, 10000, null, null)));
AddTrackCommand command = _addTrackCommandFixture.Create(metadata: _audioMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(reReleaseYear: 10000)));
// Act
List<Error> result = _validator.TestValidate(command);
@@ -943,7 +943,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenMusicBrainzRecordingIdIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(includeOptionalProperties: false);
AddTrackCommand command = _addTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1054,7 +1054,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenDiscNumberIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(includeOptionalProperties: false);
AddTrackCommand command = _addTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1093,7 +1093,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenScriptIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(includeOptionalProperties: false);
AddTrackCommand command = _addTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1132,7 +1132,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenKeyIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(includeOptionalProperties: false);
AddTrackCommand command = _addTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1173,7 +1173,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenBpmIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(includeOptionalProperties: false);
AddTrackCommand command = _addTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1212,7 +1212,7 @@ public class AddTrackCommandValidatorTests
public void Validate_WhenWorkIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddTrackCommand command = _addTrackCommandFixture.Create(includeOptionalProperties: false);
AddTrackCommand command = _addTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1175,7 +1175,7 @@ public class UpdateTrackCommandValidatorTests
public void Validate_WhenMusicBrainzRecordingIdIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeOptionalProperties: false);
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1214,7 +1214,7 @@ public class UpdateTrackCommandValidatorTests
public void Validate_WhenMusicBrainzTrackIdIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeOptionalProperties: false);
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1253,7 +1253,7 @@ public class UpdateTrackCommandValidatorTests
public void Validate_WhenMusicBrainzWorkIdIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeOptionalProperties: false);
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1357,7 +1357,7 @@ public class UpdateTrackCommandValidatorTests
public void Validate_WhenDiscNumberIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeOptionalProperties: false);
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1396,7 +1396,7 @@ public class UpdateTrackCommandValidatorTests
public void Validate_WhenScriptIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeOptionalProperties: false);
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1435,7 +1435,7 @@ public class UpdateTrackCommandValidatorTests
public void Validate_WhenKeyIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeOptionalProperties: false);
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1487,7 +1487,7 @@ public class UpdateTrackCommandValidatorTests
public void Validate_WhenBpmIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeOptionalProperties: false);
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -1526,7 +1526,7 @@ public class UpdateTrackCommandValidatorTests
public void Validate_WhenWorkIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeOptionalProperties: false);
UpdateTrackCommand command = _updateTrackCommandFixture.Create(includeDiscNumber: false, includeScript: false, includeKey: false, includeBpm: false, includeWork: false, includeMusicBrainzRecordingId: false, includeMusicBrainzTrackId: false, includeMusicBrainzWorkId: false, includeMoods: false, includeIsrcs: false);
// Act
List<Error> result = _validator.TestValidate(command);
@@ -226,7 +226,7 @@ public class AddBookCommandHandlerTests
public async Task HandleAsync_WhenCalledWithInvalidRating_ShouldReturnFailureResult()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(ratings: [_bookRatingDtoFixture.Create(value: -1, maxValue: 5, includeOptionalProperties: false)]);
AddBookCommand bookCommand = _commandBookFixture.Create(ratings: [_bookRatingDtoFixture.Create(value: -1, maxValue: 5, includeSource: false, includeVoteCount: false)]);
// Act
Result<BookResponse> result = await _sut.HandleAsync(bookCommand, CancellationToken.None);
@@ -210,7 +210,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenOriginalReleaseYearIsLessThan1_ShouldHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, 0, null, null, null, null)));
AddBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(originalReleaseYear: 0)));
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -223,7 +223,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenOriginalReleaseYearIsGreaterThan9999_ShouldHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, 10000, null, null, null, null)));
AddBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(originalReleaseYear: 10000)));
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -249,7 +249,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenReReleaseYearIsLessThan1_ShouldHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, null, null, 0, null, null)));
AddBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(reReleaseYear: 0)));
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -262,7 +262,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenReReleaseYearIsGreaterThan9999_ShouldHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, null, null, 10000, null, null)));
AddBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(reReleaseYear: 10000)));
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -756,7 +756,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenFormatIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -795,7 +795,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenEditionIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -834,7 +834,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenVolumeNumberIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -954,7 +954,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenAsinIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -980,7 +980,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenGoodreadsIdIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1045,7 +1045,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenLccnIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1110,7 +1110,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyOclcNumber_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1201,7 +1201,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenOpenLibraryIdIsNull_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1266,7 +1266,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyLibraryThingId_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1305,7 +1305,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyGoogleBooksId_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1357,7 +1357,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyBarnesAndNobleId_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1409,7 +1409,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyAppleBooksId_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1448,7 +1448,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenCalledWithNullIsbns_ShouldHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1591,7 +1591,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenCalledWithNullRatings_ShouldHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
AddBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1669,7 +1669,7 @@ public class AddBookCommandValidatorTests
public void Validate_WhenCalledWithNullVoteCount_ShouldNotHaveValidationError()
{
// Arrange
AddBookCommand bookCommand = _commandBookFixture.Create(ratings: [_bookRatingDtoFixture.Create(includeOptionalProperties: false)]);
AddBookCommand bookCommand = _commandBookFixture.Create(ratings: [_bookRatingDtoFixture.Create(includeSource: false, includeVoteCount: false)]);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -343,7 +343,7 @@ public class UpdateBookCommandHandlerTests
public async Task HandleAsync_WhenCalledWithInvalidRating_ShouldReturnFailureResult()
{
// Arrange
UpdateBookCommand command = _commandBookFixture.Create(ratings: [_bookRatingDtoFixture.Create(value: -1, maxValue: 5, includeOptionalProperties: false)]);
UpdateBookCommand command = _commandBookFixture.Create(ratings: [_bookRatingDtoFixture.Create(value: -1, maxValue: 5, includeSource: false, includeVoteCount: false)]);
BookEntity existingBook = _bookEntityFixture.Create(id: Guid.Parse(command.BookId!), libraryId: Guid.Parse(command.LibraryId!));
_mockBookRepository.GetByIdAsync(Arg.Any<Guid>(), Arg.Any<bool>(), Arg.Any<bool>(), Arg.Any<CancellationToken>())
.Returns(Result.From<BookEntity?>(existingBook));
@@ -197,7 +197,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenOriginalReleaseYearIsLessThan1_ShouldHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, 0, null, null, null, null)));
UpdateBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(originalReleaseYear: 0)));
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -210,7 +210,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenOriginalReleaseYearIsGreaterThan9999_ShouldHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, 10000, null, null, null, null)));
UpdateBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(originalReleaseYear: 10000)));
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -236,7 +236,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenReReleaseYearIsLessThan1_ShouldHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, null, null, 0, null, null)));
UpdateBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(reReleaseYear: 0)));
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -249,7 +249,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenReReleaseYearIsGreaterThan9999_ShouldHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: new ReleaseInfoDto(null, null, null, 10000, null, null)));
UpdateBookCommand bookCommand = _commandBookFixture.Create(metadata: _writtenContentMetadataDtoFixture.Create(releaseInfo: _releaseInfoDtoFixture.Create(reReleaseYear: 10000)));
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -743,7 +743,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenFormatIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -782,7 +782,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenEditionIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -821,7 +821,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenVolumeNumberIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -941,7 +941,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenAsinIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -967,7 +967,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenGoodreadsIdIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1032,7 +1032,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenLccnIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1097,7 +1097,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyOclcNumber_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1188,7 +1188,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenOpenLibraryIdIsNull_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1253,7 +1253,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyLibraryThingId_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1292,7 +1292,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyGoogleBooksId_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1344,7 +1344,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyBarnesAndNobleId_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1396,7 +1396,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenCalledWithEmptyAppleBooksId_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1435,7 +1435,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenCalledWithNullIsbns_ShouldHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1578,7 +1578,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenCalledWithNullRatings_ShouldHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeOptionalProperties: false);
UpdateBookCommand bookCommand = _commandBookFixture.Create(includeFormat: false, includeEdition: false, includeVolumeNumber: false, includeAsin: false, includeGoodreadsId: false, includeLccn: false, includeOclcNumber: false, includeOpenLibraryId: false, includeLibraryThingId: false, includeGoogleBooksId: false, includeBarnesAndNobleId: false, includeAppleBooksId: false, includeIsbns: false, includeRatings: false, includeContributors: false);
// Act
List<Error> result = _validator.TestValidate(bookCommand);
@@ -1656,7 +1656,7 @@ public class UpdateBookCommandValidatorTests
public void Validate_WhenCalledWithNullVoteCount_ShouldNotHaveValidationError()
{
// Arrange
UpdateBookCommand bookCommand = _commandBookFixture.Create(ratings: [_bookRatingDtoFixture.Create(includeOptionalProperties: false)]);
UpdateBookCommand bookCommand = _commandBookFixture.Create(ratings: [_bookRatingDtoFixture.Create(includeSource: false, includeVoteCount: false)]);
// Act
List<Error> result = _validator.TestValidate(bookCommand);