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

@@ -68,7 +68,7 @@ public class UpdateArtistCommandMappingTests
Album updatedAlbum = result.Value.Albums.First(album => album.Id.Value == albumId);
Assert.Equal(albumCommand.Metadata!.Title, updatedAlbum.Metadata.Title);
Track updatedTrack = updatedAlbum.Tracks.First(track => track.Id.Value == trackId);
// the file system path of an existing track is never changed by the update, it is set only when the track is created
// The file system path of an existing track is never changed by the update, it is set only when the track is created.
Assert.Equal(originalPath, updatedTrack.Path);
Assert.NotEqual(attemptedPath, updatedTrack.Path);
Assert.Equal(7, updatedTrack.TrackNumber);
@@ -35,8 +35,8 @@ public class ArtistAliasEntityMappingTests
}
[Theory]
[InlineData("")] // empty name
[InlineData(" ")] // whitespace name
[InlineData("")] // Empty name.
[InlineData(" ")] // Whitespace name.
public void ToDomainValueObject_WhenNameIsEmpty_ShouldReturnError(string name)
{
// Arrange
@@ -50,9 +50,9 @@ public class IsrcDtoMappingTests
}
[Theory]
[InlineData(null)] // missing value
[InlineData("")] // empty value
[InlineData(" ")] // whitespace value
[InlineData(null)] // Missing value.
[InlineData("")] // Empty value.
[InlineData(" ")] // Whitespace value.
public void ToDomainValueObject_WhenValueIsNullOrWhitespace_ShouldReturnError(string? value)
{
// Arrange
@@ -67,11 +67,11 @@ public class IsrcDtoMappingTests
}
[Theory]
[InlineData("invalid")] // not an ISRC at all
[InlineData("GBUM7102960")] // too short
[InlineData("GBUM71029604X")] // too long
[InlineData("1BUM71029604")] // country code is not two letters
[InlineData("GBUM7102960A")] // designation code is not all digits
[InlineData("invalid")] // Not an ISRC at all.
[InlineData("GBUM7102960")] // Too short.
[InlineData("GBUM71029604X")] // Too long.
[InlineData("1BUM71029604")] // Country code is not two letters.
[InlineData("GBUM7102960A")] // Designation code is not all digits.
public void ToDomainValueObject_WhenValueIsMalformed_ShouldReturnError(string value)
{
// Arrange
@@ -66,8 +66,8 @@ public class IsrcEntityMappingTests
}
[Theory]
[InlineData("")] // empty value
[InlineData(" ")] // whitespace value
[InlineData("")] // Empty value.
[InlineData(" ")] // Whitespace value.
public void ToDomainValueObject_WhenValueIsWhitespace_ShouldReturnError(string value)
{
// Arrange
@@ -36,9 +36,9 @@ public class MoodDtoMappingTests
}
[Theory]
[InlineData(null)] // missing name
[InlineData("")] // empty name
[InlineData(" ")] // whitespace name
[InlineData(null)] // Missing name.
[InlineData("")] // Empty name.
[InlineData(" ")] // Whitespace name.
public void ToDomainValueObject_WhenNameIsNullOrWhitespace_ShouldReturnError(string? name)
{
// Arrange
@@ -66,8 +66,8 @@ public class MoodEntityMappingTests
}
[Theory]
[InlineData("")] // empty name
[InlineData(" ")] // whitespace name
[InlineData("")] // Empty name.
[InlineData(" ")] // Whitespace name.
public void ToDomainValueObject_WhenNameIsWhitespace_ShouldReturnError(string name)
{
// Arrange
@@ -65,9 +65,9 @@ public class MusicAreaDtoMappingTests
}
[Theory]
[InlineData(null)] // missing name
[InlineData("")] // empty name
[InlineData(" ")] // whitespace name
[InlineData(null)] // Missing name.
[InlineData("")] // Empty name.
[InlineData(" ")] // Whitespace name.
public void ToDomainValueObject_WhenNameIsNullOrWhitespace_ShouldReturnError(string? name)
{
// Arrange
@@ -36,8 +36,8 @@ public class MusicAreaEntityMappingTests
}
[Theory]
[InlineData("")] // empty name
[InlineData(" ")] // whitespace name
[InlineData("")] // Empty name.
[InlineData(" ")] // Whitespace name.
public void ToDomainValueObject_WhenNameIsEmpty_ShouldReturnError(string name)
{
// Arrange
@@ -35,9 +35,9 @@ public class MusicArtistAliasDtoMappingTests
}
[Theory]
[InlineData(null)] // missing name
[InlineData("")] // empty name
[InlineData(" ")] // whitespace name
[InlineData(null)] // Missing name.
[InlineData("")] // Empty name.
[InlineData(" ")] // Whitespace name.
public void ToDomainValueObject_WhenNameIsNullOrWhitespace_ShouldReturnError(string? name)
{
// Arrange
@@ -92,8 +92,8 @@ public class MusicWorkDtoMappingTests
}
[Theory]
[InlineData("")] // empty work title
[InlineData(" ")] // whitespace work title
[InlineData("")] // Empty work title.
[InlineData(" ")] // Whitespace work title.
public void ToDomainEntity_WhenTitleIsEmptyOrWhitespace_ShouldReturnError(string title)
{
// Arrange
@@ -88,9 +88,9 @@ public class ShuffleTracksRequestMappingTests
}
[Theory]
[InlineData("not-a-guid")] // a value that cannot be parsed
[InlineData("' OR '1'='1")] // an injection payload
[InlineData("'; DROP TABLE Tracks; --")] // a destructive injection payload
[InlineData("not-a-guid")] // A value that cannot be parsed.
[InlineData("' OR '1'='1")] // An injection payload.
[InlineData("'; DROP TABLE Tracks; --")] // A destructive injection payload.
public void ToQuery_WhenLibraryIdArgumentIsNotParseable_ShouldPassItVerbatim(string libraryId)
{
// Arrange
@@ -93,7 +93,7 @@ public class UpdateTrackCommandMappingTests
// Assert
Assert.False(result.IsFailure);
Track updatedTrack = result.Value.Albums.First(album => album.Id.Value == albumId).Tracks.First(track => track.Id.Value == trackId);
// the file system path is never changed by the update, it is set only when the track is created
// The file system path is never changed by the update, it is set only when the track is created.
Assert.Equal(originalPath, updatedTrack.Path);
Assert.Equal(command.TrackNumber, updatedTrack.TrackNumber);
Assert.False(updatedTrack.DiscNumber.HasValue);