mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
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:
1 parent
727aa33318
commit
057f557791
540 files changed
+3888
-3888
No files matched your search
+2
-2
@@ -44,8 +44,8 @@ public class AudioRatingTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(-1)] // negative value
|
||||
[InlineData(-0.5)] // negative fractional value
|
||||
[InlineData(-1)] // Negative value.
|
||||
[InlineData(-0.5)] // Negative fractional value.
|
||||
public void Create_WhenValueIsNegative_ShouldReturnError(double value)
|
||||
{
|
||||
// Act
|
||||
|
||||
+6
-6
@@ -190,9 +190,9 @@ public class ArtistTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // null name
|
||||
[InlineData("")] // empty name
|
||||
[InlineData(" ")] // whitespace name
|
||||
[InlineData(null)] // Null name.
|
||||
[InlineData("")] // Empty name.
|
||||
[InlineData(" ")] // Whitespace name.
|
||||
public void Create_WhenNameIsNullOrWhitespace_ShouldReturnArtistNameCannotBeEmptyError(string? name)
|
||||
{
|
||||
// Act
|
||||
@@ -311,9 +311,9 @@ public class ArtistTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // null name
|
||||
[InlineData("")] // empty name
|
||||
[InlineData(" ")] // whitespace name
|
||||
[InlineData(null)] // Null name.
|
||||
[InlineData("")] // Empty name.
|
||||
[InlineData(" ")] // Whitespace name.
|
||||
public void CreateWithId_WhenNameIsNullOrWhitespace_ShouldReturnArtistNameCannotBeEmptyError(string? name)
|
||||
{
|
||||
// Act
|
||||
|
||||
+1
-1
@@ -351,7 +351,7 @@ public class AlbumTests
|
||||
Assert.Equal(releaseArtistId, album.MusicBrainzReleaseArtistId);
|
||||
Assert.True(album.UpdatedOnUtc.HasValue);
|
||||
Assert.True(album.UpdatedOnUtc.Value >= beforeUpdate);
|
||||
// the tracks are not part of the details update
|
||||
// The tracks are not part of the details update.
|
||||
Assert.Equal(originalTracks, album.Tracks);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -123,7 +123,7 @@ public class TrackTests
|
||||
track.UpdateMoods([secondMood]);
|
||||
|
||||
// Assert
|
||||
// the second call replaces the first set, it is not appended to it
|
||||
// The second call replaces the first set, it is not appended to it.
|
||||
Mood storedMood = Assert.Single(track.Moods);
|
||||
Assert.Equal(secondMood, storedMood);
|
||||
Assert.DoesNotContain(firstMood, track.Moods);
|
||||
@@ -142,7 +142,7 @@ public class TrackTests
|
||||
track.UpdateIsrcs([secondIsrc]);
|
||||
|
||||
// Assert
|
||||
// the second call replaces the first set, it is not appended to it
|
||||
// The second call replaces the first set, it is not appended to it.
|
||||
Isrc storedIsrc = Assert.Single(track.Isrcs);
|
||||
Assert.Equal(secondIsrc, storedIsrc);
|
||||
Assert.DoesNotContain(firstIsrc, track.Isrcs);
|
||||
@@ -161,7 +161,7 @@ public class TrackTests
|
||||
track.UpdateContributors([secondContributor]);
|
||||
|
||||
// Assert
|
||||
// the second call replaces the first set, it is not appended to it
|
||||
// The second call replaces the first set, it is not appended to it.
|
||||
MusicMediaContributor storedContributor = Assert.Single(track.Contributors);
|
||||
Assert.Equal(secondContributor, storedContributor);
|
||||
Assert.DoesNotContain(firstContributor, track.Contributors);
|
||||
@@ -180,7 +180,7 @@ public class TrackTests
|
||||
track.UpdateRatings([secondRating]);
|
||||
|
||||
// Assert
|
||||
// the second call replaces the first set, it is not appended to it
|
||||
// The second call replaces the first set, it is not appended to it.
|
||||
AudioRating storedRating = Assert.Single(track.Ratings);
|
||||
Assert.Equal(secondRating, storedRating);
|
||||
}
|
||||
|
||||
+8
-8
@@ -50,9 +50,9 @@ public class BarcodeTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // null barcode value
|
||||
[InlineData("")] // empty barcode value
|
||||
[InlineData(" ")] // whitespace barcode value
|
||||
[InlineData(null)] // Null barcode value.
|
||||
[InlineData("")] // Empty barcode value.
|
||||
[InlineData(" ")] // Whitespace barcode value.
|
||||
public void Create_WhenValueIsNullOrWhitespace_ShouldReturnBarcodeValueCannotBeEmptyError(string? value)
|
||||
{
|
||||
// Act
|
||||
@@ -64,11 +64,11 @@ public class BarcodeTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("12345678901")] // eleven digits, one too few
|
||||
[InlineData("12345678901234")] // fourteen digits, one too many
|
||||
[InlineData("12345678901A")] // contains a letter
|
||||
[InlineData("1234-56789012")] // contains a separator
|
||||
[InlineData("1234567890.2")] // contains a decimal separator
|
||||
[InlineData("12345678901")] // Eleven digits, one too few.
|
||||
[InlineData("12345678901234")] // Fourteen digits, one too many.
|
||||
[InlineData("12345678901A")] // Contains a letter.
|
||||
[InlineData("1234-56789012")] // Contains a separator.
|
||||
[InlineData("1234567890.2")] // Contains a decimal separator.
|
||||
public void Create_WhenValueHasInvalidFormat_ShouldReturnInvalidFormatForBarcodeError(string value)
|
||||
{
|
||||
// Act
|
||||
|
||||
+8
-8
@@ -39,9 +39,9 @@ public class IsrcTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // null ISRC value
|
||||
[InlineData("")] // empty ISRC value
|
||||
[InlineData(" ")] // whitespace ISRC value
|
||||
[InlineData(null)] // Null ISRC value.
|
||||
[InlineData("")] // Empty ISRC value.
|
||||
[InlineData(" ")] // Whitespace ISRC value.
|
||||
public void Create_WhenValueIsNullOrWhitespace_ShouldReturnError(string? value)
|
||||
{
|
||||
// Act
|
||||
@@ -53,11 +53,11 @@ public class IsrcTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("USRC1760783")] // too short
|
||||
[InlineData("USRC176078399")] // too long
|
||||
[InlineData("1SRC17607839")] // country code does not start with two letters
|
||||
[InlineData("USRC1760783X")] // designation segment is not purely numeric
|
||||
[InlineData("USRC-7607839")] // contains an invalid character
|
||||
[InlineData("USRC1760783")] // Too short.
|
||||
[InlineData("USRC176078399")] // Too long.
|
||||
[InlineData("1SRC17607839")] // Country code does not start with two letters.
|
||||
[InlineData("USRC1760783X")] // Designation segment is not purely numeric.
|
||||
[InlineData("USRC-7607839")] // Contains an invalid character.
|
||||
public void Create_WhenValueHasInvalidFormat_ShouldReturnError(string value)
|
||||
{
|
||||
// Act
|
||||
|
||||
+3
-3
@@ -61,9 +61,9 @@ public class MusicAreaTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // null area name
|
||||
[InlineData("")] // empty area name
|
||||
[InlineData(" ")] // whitespace area name
|
||||
[InlineData(null)] // Null area name.
|
||||
[InlineData("")] // Empty area name.
|
||||
[InlineData(" ")] // Whitespace area name.
|
||||
public void Create_WhenNameIsNullOrWhitespace_ShouldReturnError(string? name)
|
||||
{
|
||||
// Act
|
||||
|
||||
+3
-3
@@ -67,9 +67,9 @@ public class MusicArtistAliasTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // null alias name
|
||||
[InlineData("")] // empty alias name
|
||||
[InlineData(" ")] // whitespace alias name
|
||||
[InlineData(null)] // Null alias name.
|
||||
[InlineData("")] // Empty alias name.
|
||||
[InlineData(" ")] // Whitespace alias name.
|
||||
public void Create_WhenNameIsNullOrWhitespace_ShouldReturnError(string? name)
|
||||
{
|
||||
// Act
|
||||
|
||||
+3
-3
@@ -63,9 +63,9 @@ public class MusicWorkTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // null work title
|
||||
[InlineData("")] // empty work title
|
||||
[InlineData(" ")] // whitespace work title
|
||||
[InlineData(null)] // Null work title.
|
||||
[InlineData("")] // Empty work title.
|
||||
[InlineData(" ")] // Whitespace work title.
|
||||
public void Create_WhenTitleIsNullOrWhitespace_ShouldReturnError(string? title)
|
||||
{
|
||||
// Act
|
||||
|
||||
Reference in new issue
Block a user