Formats code comments as sentences in the tests.

Capitalizes the first word and adds the terminal period in the unit, integration and security tests. The AAA markers stay bare, the TODO bodies stay lowercase, and no assertion, payload, expected status code or test signature changes.
This commit is contained in:
BinaryAlley committed 2026-11-16 18:17:29 +02:00
1 parent 727aa33318
commit 057f557791
540 files changed
+3888 -3888

No files matched your search

@@ -117,9 +117,9 @@ public class AddFavoriteCommandHandlerTests
}
[Theory]
[InlineData(FavoriteMediaKind.None)] // the default value, which is not a kind that can be favorited
[InlineData(FavoriteMediaKind.Video)] // video libraries are not catalogued yet
[InlineData(FavoriteMediaKind.Photo)] // photo libraries are not catalogued yet
[InlineData(FavoriteMediaKind.None)] // The default value, which is not a kind that can be favorited.
[InlineData(FavoriteMediaKind.Video)] // Video libraries are not catalogued yet.
[InlineData(FavoriteMediaKind.Photo)] // Photo libraries are not catalogued yet.
public async Task HandleAsync_WhenMediaKindIsNotSupported_ShouldReturnNotSupportedAndNotResolveTheLibrary(FavoriteMediaKind mediaKind)
{
// Arrange
@@ -156,10 +156,10 @@ public class AddFavoriteCommandHandlerTests
}
[Theory]
[InlineData(FavoriteMediaKind.MusicArtist, nameof(DomainErrors.Music.ArtistNotFound))] // the artist does not exist
[InlineData(FavoriteMediaKind.MusicAlbum, nameof(DomainErrors.Music.AlbumNotFound))] // the album does not exist
[InlineData(FavoriteMediaKind.MusicTrack, nameof(DomainErrors.Music.TrackNotFound))] // the track does not exist
[InlineData(FavoriteMediaKind.Book, nameof(DomainErrors.WrittenContent.BookNotFound))] // the book does not exist
[InlineData(FavoriteMediaKind.MusicArtist, nameof(DomainErrors.Music.ArtistNotFound))] // The artist does not exist.
[InlineData(FavoriteMediaKind.MusicAlbum, nameof(DomainErrors.Music.AlbumNotFound))] // The album does not exist.
[InlineData(FavoriteMediaKind.MusicTrack, nameof(DomainErrors.Music.TrackNotFound))] // The track does not exist.
[InlineData(FavoriteMediaKind.Book, nameof(DomainErrors.WrittenContent.BookNotFound))] // The book does not exist.
public async Task HandleAsync_WhenTheMediaItemHasNoLibrary_ShouldReturnTheMediaKindSpecificNotFoundError(FavoriteMediaKind mediaKind, string expectedErrorDescription)
{
// Arrange
@@ -61,12 +61,12 @@ public class AddFavoriteCommandValidatorTests
}
[Theory]
[InlineData(FavoriteMediaKind.MusicArtist)] // a catalogued music kind
[InlineData(FavoriteMediaKind.MusicAlbum)] // a catalogued music kind
[InlineData(FavoriteMediaKind.MusicTrack)] // a catalogued music kind
[InlineData(FavoriteMediaKind.Book)] // a catalogued written content kind
[InlineData(FavoriteMediaKind.Video)] // a planned kind is still a defined enumeration member
[InlineData(FavoriteMediaKind.Photo)] // a planned kind is still a defined enumeration member
[InlineData(FavoriteMediaKind.MusicArtist)] // A catalogued music kind.
[InlineData(FavoriteMediaKind.MusicAlbum)] // A catalogued music kind.
[InlineData(FavoriteMediaKind.MusicTrack)] // A catalogued music kind.
[InlineData(FavoriteMediaKind.Book)] // A catalogued written content kind.
[InlineData(FavoriteMediaKind.Video)] // A planned kind is still a defined enumeration member.
[InlineData(FavoriteMediaKind.Photo)] // A planned kind is still a defined enumeration member.
public void Validate_WhenMediaKindIsDefined_ShouldNotHaveValidationError(FavoriteMediaKind mediaKind)
{
// Arrange
@@ -34,15 +34,15 @@ public class RemoveFavoriteCommandValidatorTests
}
[Theory]
[InlineData("")] // the media kind is empty
[InlineData(" ")] // the media kind is whitespace only
[InlineData("Hologram")] // the media kind is not a member of the enumeration
[InlineData("None")] // the default value is not a kind that can be favorited
[InlineData("none")] // the default value, matched case insensitively
[InlineData("0")] // the media kind is a numeric route value, which the validator rejects by name
[InlineData("1")] // a numeric route value that parses to a defined member, which the name check rejects
[InlineData("MusicTrack,Book")] // a comma separated list is not a single member name
[InlineData("../MusicTrack")] // a path-like value is not a member name
[InlineData("")] // The media kind is empty.
[InlineData(" ")] // The media kind is whitespace only.
[InlineData("Hologram")] // The media kind is not a member of the enumeration.
[InlineData("None")] // The default value is not a kind that can be favorited.
[InlineData("none")] // The default value, matched case insensitively.
[InlineData("0")] // The media kind is a numeric route value, which the validator rejects by name.
[InlineData("1")] // A numeric route value that parses to a defined member, which the name check rejects.
[InlineData("MusicTrack,Book")] // A comma separated list is not a single member name.
[InlineData("../MusicTrack")] // A path-like value is not a member name.
public void Validate_WhenMediaKindIsEmptyOrNotAMemberName_ShouldHaveValidationError(string mediaKind)
{
// Arrange
@@ -56,8 +56,8 @@ public class RemoveFavoriteCommandValidatorTests
}
[Theory]
[InlineData("musictrack")] // the member name is lower case
[InlineData("BoOk")] // the member name is mixed case
[InlineData("musictrack")] // The member name is lower case.
[InlineData("BoOk")] // The member name is mixed case.
public void Validate_WhenMediaKindUsesDifferentCasing_ShouldNotHaveValidationError(string mediaKind)
{
// Arrange
@@ -84,10 +84,10 @@ public class RemoveFavoriteCommandValidatorTests
}
[Theory]
[InlineData("")] // the media item Id is empty
[InlineData(" ")] // the media item Id is whitespace only
[InlineData("not-a-guid")] // the media item Id is not a Guid
[InlineData("00000000-0000-0000-0000-000000000000")] // the media item Id is the empty Guid
[InlineData("")] // The media item Id is empty.
[InlineData(" ")] // The media item Id is whitespace only.
[InlineData("not-a-guid")] // The media item Id is not a Guid.
[InlineData("00000000-0000-0000-0000-000000000000")] // The media item Id is the empty Guid.
public void Validate_WhenMediaItemIdIsEmptyOrInvalid_ShouldHaveValidationError(string mediaItemId)
{
// Arrange
@@ -61,12 +61,12 @@ public class GetFavoritesQueryValidatorTests
}
[Theory]
[InlineData(FavoriteMediaKind.MusicArtist)] // a catalogued music kind
[InlineData(FavoriteMediaKind.MusicAlbum)] // a catalogued music kind
[InlineData(FavoriteMediaKind.MusicTrack)] // a catalogued music kind
[InlineData(FavoriteMediaKind.Book)] // a catalogued written content kind
[InlineData(FavoriteMediaKind.Video)] // a planned kind is still a defined enumeration member
[InlineData(FavoriteMediaKind.Photo)] // a planned kind is still a defined enumeration member
[InlineData(FavoriteMediaKind.MusicArtist)] // A catalogued music kind.
[InlineData(FavoriteMediaKind.MusicAlbum)] // A catalogued music kind.
[InlineData(FavoriteMediaKind.MusicTrack)] // A catalogued music kind.
[InlineData(FavoriteMediaKind.Book)] // A catalogued written content kind.
[InlineData(FavoriteMediaKind.Video)] // A planned kind is still a defined enumeration member.
[InlineData(FavoriteMediaKind.Photo)] // A planned kind is still a defined enumeration member.
public void Validate_WhenMediaKindIsDefined_ShouldNotHaveValidationError(FavoriteMediaKind mediaKind)
{
// Arrange