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

@@ -13,21 +13,21 @@ namespace Lumina.Application.UnitTests.Common.Utilities;
public class AudioFileFormatUtilitiesTests
{
[Theory]
[InlineData("track.mp3", AudioFileFormat.MP3)] // mp3 audio file
[InlineData("track.flac", AudioFileFormat.FLAC)] // flac audio file
[InlineData("track.m4a", AudioFileFormat.M4A)] // m4a audio file
[InlineData("track.aac", AudioFileFormat.AAC)] // aac audio file
[InlineData("track.ogg", AudioFileFormat.OGG)] // ogg audio file
[InlineData("track.opus", AudioFileFormat.OPUS)] // opus audio file
[InlineData("track.wav", AudioFileFormat.WAV)] // wav audio file
[InlineData("track.wma", AudioFileFormat.WMA)] // wma audio file
[InlineData("track.aiff", AudioFileFormat.AIFF)] // aiff audio file
[InlineData("track.aif", AudioFileFormat.AIFF)] // aif audio file
[InlineData("track.ape", AudioFileFormat.APE)] // ape audio file
[InlineData("track.wv", AudioFileFormat.WAVPACK)] // wavpack audio file
[InlineData("track.dsf", AudioFileFormat.DSF)] // dsf audio file
[InlineData("track.dff", AudioFileFormat.DFF)] // dff audio file
[InlineData("track.mka", AudioFileFormat.MATROSKA)] // matroska audio file
[InlineData("track.mp3", AudioFileFormat.MP3)] // MP3 audio file.
[InlineData("track.flac", AudioFileFormat.FLAC)] // FLAC audio file.
[InlineData("track.m4a", AudioFileFormat.M4A)] // M4A audio file.
[InlineData("track.aac", AudioFileFormat.AAC)] // AAC audio file.
[InlineData("track.ogg", AudioFileFormat.OGG)] // OGG audio file.
[InlineData("track.opus", AudioFileFormat.OPUS)] // Opus audio file.
[InlineData("track.wav", AudioFileFormat.WAV)] // WAV audio file.
[InlineData("track.wma", AudioFileFormat.WMA)] // WMA audio file.
[InlineData("track.aiff", AudioFileFormat.AIFF)] // AIFF audio file.
[InlineData("track.aif", AudioFileFormat.AIFF)] // AIF audio file.
[InlineData("track.ape", AudioFileFormat.APE)] // APE audio file.
[InlineData("track.wv", AudioFileFormat.WAVPACK)] // WavPack audio file.
[InlineData("track.dsf", AudioFileFormat.DSF)] // DSF audio file.
[InlineData("track.dff", AudioFileFormat.DFF)] // DFF audio file.
[InlineData("track.mka", AudioFileFormat.MATROSKA)] // Matroska audio file.
public void ToAudioFileFormat_WhenExtensionIsKnown_ShouldReturnMappedFormat(string filePath, AudioFileFormat expectedFormat)
{
// Act
@@ -23,9 +23,9 @@ public class DurationUtilitiesTests
}
[Theory]
[InlineData(1, 0.001)] // a single millisecond is preserved
[InlineData(1_500, 1.5)] // whole milliseconds convert to fractional seconds
[InlineData(60_000, 60)] // a full minute converts exactly
[InlineData(1, 0.001)] // A single millisecond is preserved.
[InlineData(1_500, 1.5)] // Whole milliseconds convert to fractional seconds.
[InlineData(60_000, 60)] // A full minute converts exactly.
public void ToClampedTimeSpan_WhenMillisecondsIsWithinTheRepresentableRange_ShouldConvertToTheEquivalentSeconds(long milliseconds, double expectedTotalSeconds)
{
// Act
@@ -36,8 +36,8 @@ public class DurationUtilitiesTests
}
[Theory]
[InlineData(-1)] // a single negative millisecond
[InlineData(-1_500)] // negative fractional seconds
[InlineData(-1)] // A single negative millisecond.
[InlineData(-1_500)] // Negative fractional seconds.
public void ToClampedTimeSpan_WhenMillisecondsIsNegative_ShouldReturnTheEquivalentNegativeDuration(long milliseconds)
{
// Act
@@ -15,10 +15,10 @@ namespace Lumina.Application.UnitTests.Common.Utilities;
public class FavoriteMediaKindExtensionsTests
{
[Theory]
[InlineData(FavoriteMediaKind.MusicArtist, nameof(DomainErrors.Music.ArtistNotFound))] // an artist has no library of its own
[InlineData(FavoriteMediaKind.MusicAlbum, nameof(DomainErrors.Music.AlbumNotFound))] // an album is not a media item that can be favorited
[InlineData(FavoriteMediaKind.MusicTrack, nameof(DomainErrors.Music.TrackNotFound))] // a track is resolved through the music catalogue
[InlineData(FavoriteMediaKind.Book, nameof(DomainErrors.WrittenContent.BookNotFound))] // a book is resolved through the written content catalogue
[InlineData(FavoriteMediaKind.MusicArtist, nameof(DomainErrors.Music.ArtistNotFound))] // An artist has no library of its own.
[InlineData(FavoriteMediaKind.MusicAlbum, nameof(DomainErrors.Music.AlbumNotFound))] // An album is not a media item that can be favorited.
[InlineData(FavoriteMediaKind.MusicTrack, nameof(DomainErrors.Music.TrackNotFound))] // A track is resolved through the music catalogue.
[InlineData(FavoriteMediaKind.Book, nameof(DomainErrors.WrittenContent.BookNotFound))] // A book is resolved through the written content catalogue.
public void ToMediaItemNotFoundError_WhenTheMediaKindIsCatalogued_ShouldReturnTheMediaSpecificNotFoundError(FavoriteMediaKind mediaKind, string expectedDescription)
{
// Act
@@ -29,9 +29,9 @@ public class FavoriteMediaKindExtensionsTests
}
[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 void ToMediaItemNotFoundError_WhenTheMediaKindIsNotCatalogued_ShouldReturnTheNotSupportedError(FavoriteMediaKind mediaKind)
{
// Act
@@ -34,8 +34,8 @@ public class ValidatorUtilitiesTests
}
[Theory]
[InlineData(4)] // value is greater than the comparison value
[InlineData(100)] // value is much greater than the comparison value
[InlineData(4)] // Value is greater than the comparison value.
[InlineData(100)] // Value is much greater than the comparison value.
public void Validate_WhenIntValueIsGreaterThanComparison_ShouldNotHaveValidationError(int value)
{
// Arrange
@@ -50,9 +50,9 @@ public class ValidatorUtilitiesTests
}
[Theory]
[InlineData(3)] // value equals the comparison value
[InlineData(1)] // value is smaller than the comparison value
[InlineData(-5)] // value is negative and smaller than the comparison value
[InlineData(3)] // Value equals the comparison value.
[InlineData(1)] // Value is smaller than the comparison value.
[InlineData(-5)] // Value is negative and smaller than the comparison value.
public void Validate_WhenIntValueIsNotGreaterThanComparison_ShouldHaveValidationError(int value)
{
// Arrange
@@ -262,9 +262,9 @@ public class ValidatorUtilitiesTests
}
[Theory]
[InlineData(null)] // null string
[InlineData("")] // empty string
[InlineData(" ")] // white-space only string
[InlineData(null)] // Null string.
[InlineData("")] // Empty string.
[InlineData(" ")] // White-space only string.
public void Validate_WhenNotEmptyValueIsEmpty_ShouldHaveValidationError(string? value)
{
// Arrange
@@ -432,9 +432,9 @@ public class ValidatorUtilitiesTests
}
[Theory]
[InlineData(nameof(ValidatorUtilitiesTestEnum.First))] // the exact member name
[InlineData("first")] // the member name in lower case
[InlineData("SECOND")] // the member name in upper case
[InlineData(nameof(ValidatorUtilitiesTestEnum.First))] // The exact member name.
[InlineData("first")] // The member name in lower case.
[InlineData("SECOND")] // The member name in upper case.
public void Validate_WhenTextualEnumValueIsAMemberName_ShouldNotHaveValidationError(string textualEnumValue)
{
// Arrange
@@ -448,12 +448,12 @@ public class ValidatorUtilitiesTests
}
[Theory]
[InlineData("")] // an empty value
[InlineData(" ")] // a whitespace only value
[InlineData("Unknown")] // a name that is not a member of the enumeration
[InlineData("0")] // a number that is a defined member value, which must still be rejected
[InlineData("1")] // another number that is a defined member value
[InlineData("99")] // a number that is not a member value
[InlineData("")] // An empty value.
[InlineData(" ")] // A whitespace only value.
[InlineData("Unknown")] // A name that is not a member of the enumeration.
[InlineData("0")] // A number that is a defined member value, which must still be rejected.
[InlineData("1")] // Another number that is a defined member value.
[InlineData("99")] // A number that is not a member value.
public void Validate_WhenTextualEnumValueIsNotAMemberName_ShouldHaveValidationError(string textualEnumValue)
{
// Arrange
@@ -886,8 +886,8 @@ public class ValidatorUtilitiesTests
}
[Theory]
[InlineData(0.99)] // just below the minimum
[InlineData(10.01)] // just above the maximum
[InlineData(0.99)] // Just below the minimum.
[InlineData(10.01)] // Just above the maximum.
public void Validate_WhenInclusiveNullableDoubleValueIsOutsideRange_ShouldHaveValidationError(double inclusiveNullableDoubleValue)
{
// Arrange
@@ -902,9 +902,9 @@ public class ValidatorUtilitiesTests
}
[Theory]
[InlineData(1.0)] // the minimum
[InlineData(5.0)] // a middle value
[InlineData(10.0)] // the maximum
[InlineData(1.0)] // The minimum.
[InlineData(5.0)] // A middle value.
[InlineData(10.0)] // The maximum.
public void Validate_WhenInclusiveNullableDoubleValueIsWithinRange_ShouldNotHaveValidationError(double inclusiveNullableDoubleValue)
{
// Arrange