mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11: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
+19
-19
@@ -316,10 +316,10 @@ public class FavoriteRepositoryTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(FavoriteMediaKind.MusicArtist)] // the artist catalogue serves the library Id of an artist
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum)] // the album catalogue serves the library Id of an album
|
||||
[InlineData(FavoriteMediaKind.MusicTrack)] // the track catalogue serves the library Id of a track
|
||||
[InlineData(FavoriteMediaKind.Book)] // the book catalogue serves the library Id of a book
|
||||
[InlineData(FavoriteMediaKind.MusicArtist)] // The artist catalogue serves the library Id of an artist.
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum)] // The album catalogue serves the library Id of an album.
|
||||
[InlineData(FavoriteMediaKind.MusicTrack)] // The track catalogue serves the library Id of a track.
|
||||
[InlineData(FavoriteMediaKind.Book)] // The book catalogue serves the library Id of a book.
|
||||
public async Task GetMediaItemLibraryIdAsync_WhenTheMediaItemExists_ShouldReturnTheLibraryIdOfItsCatalogue(FavoriteMediaKind mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -390,9 +390,9 @@ public class FavoriteRepositoryTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(FavoriteMediaKind.Video)] // planned kind, no video catalogue exists
|
||||
[InlineData(FavoriteMediaKind.Photo)] // planned kind, no photo catalogue exists
|
||||
[InlineData((FavoriteMediaKind)999)] // an undefined value that is neither catalogued nor planned
|
||||
[InlineData(FavoriteMediaKind.Video)] // Planned kind, no video catalogue exists.
|
||||
[InlineData(FavoriteMediaKind.Photo)] // Planned kind, no photo catalogue exists.
|
||||
[InlineData((FavoriteMediaKind)999)] // An undefined value that is neither catalogued nor planned.
|
||||
public async Task GetMediaItemLibraryIdAsync_WhenTheKindHasNoCatalogue_ShouldReturnSuccessWithNullWithoutReadingTheCatalogue(FavoriteMediaKind mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -911,8 +911,8 @@ public class FavoriteRepositoryTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(FavoriteMediaKind.Video)] // planned kind, so no display data can be resolved yet
|
||||
[InlineData(FavoriteMediaKind.Photo)] // planned kind, so no display data can be resolved yet
|
||||
[InlineData(FavoriteMediaKind.Video)] // Planned kind, so no display data can be resolved yet.
|
||||
[InlineData(FavoriteMediaKind.Photo)] // Planned kind, so no display data can be resolved yet.
|
||||
public async Task GetAllForUserAsync_WhenTheFavoriteIsOfAPlannedKind_ShouldReturnItWithoutDisplayData(FavoriteMediaKind mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -1121,11 +1121,11 @@ public class FavoriteRepositoryTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(FavoriteMediaKind.MusicArtist, false)] // the artist itself is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum, false)] // the album itself is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum, true)] // the album's artist is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicTrack, false)] // the track itself is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicTrack, true)] // the track's album is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicArtist, false)] // The artist itself is soft deleted.
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum, false)] // The album itself is soft deleted.
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum, true)] // The album's artist is soft deleted.
|
||||
[InlineData(FavoriteMediaKind.MusicTrack, false)] // The track itself is soft deleted.
|
||||
[InlineData(FavoriteMediaKind.MusicTrack, true)] // The track's album is soft deleted.
|
||||
public async Task GetMediaItemLibraryIdAsync_WhenTheMusicItemIsSoftDeleted_ShouldReturnSuccessWithNull(FavoriteMediaKind mediaKind, bool isAncestorDeleted)
|
||||
{
|
||||
// Arrange
|
||||
@@ -1144,11 +1144,11 @@ public class FavoriteRepositoryTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(FavoriteMediaKind.MusicArtist, false)] // the artist itself is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum, false)] // the album itself is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum, true)] // the album's artist is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicTrack, false)] // the track itself is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicTrack, true)] // the track's album is soft deleted
|
||||
[InlineData(FavoriteMediaKind.MusicArtist, false)] // The artist itself is soft deleted.
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum, false)] // The album itself is soft deleted.
|
||||
[InlineData(FavoriteMediaKind.MusicAlbum, true)] // The album's artist is soft deleted.
|
||||
[InlineData(FavoriteMediaKind.MusicTrack, false)] // The track itself is soft deleted.
|
||||
[InlineData(FavoriteMediaKind.MusicTrack, true)] // The track's album is soft deleted.
|
||||
public async Task GetAllForUserAsync_WhenTheFavoritedMusicItemIsSoftDeleted_ShouldKeepTheFavoriteWithoutDisplayData(FavoriteMediaKind mediaKind, bool isAncestorDeleted)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+3
-3
@@ -193,9 +193,9 @@ public class ArtistAlphaFilterSpecificationTests : IDisposable
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("a", "Alpha")] // the first letter of the alphabet
|
||||
[InlineData("b", "Bravo")] // a letter in the middle of the alphabet
|
||||
[InlineData("c", "Charlie")] // another letter in the middle of the alphabet
|
||||
[InlineData("a", "Alpha")] // The first letter of the alphabet.
|
||||
[InlineData("b", "Bravo")] // A letter in the middle of the alphabet.
|
||||
[InlineData("c", "Charlie")] // Another letter in the middle of the alphabet.
|
||||
public void ToExpression_WhenAlphaKeyIsALetter_ShouldMatchOnlyTheNamesStartingWithIt(string alphaKey, string matchingName)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+2
-2
@@ -212,7 +212,7 @@ public class UnitOfWorkTests
|
||||
Result<Success> firstSaveResult = await sut.SaveChangesAsync(CancellationToken.None);
|
||||
Assert.False(firstSaveResult.IsFailure);
|
||||
|
||||
// stage a second book with the same library and path directly, bypassing the application level pre-check, so that the unique index of the storage medium is the one that rejects it
|
||||
// Stage a second book with the same library and path directly, bypassing the application level pre-check, so that the unique index of the storage medium is the one that rejects it.
|
||||
BookEntity secondBook = _bookEntityFixture.Create();
|
||||
secondBook.LibraryId = libraryId;
|
||||
secondBook.Path = "/books/duplicate.epub";
|
||||
@@ -275,7 +275,7 @@ public class UnitOfWorkTests
|
||||
Result<Success> firstSaveResult = await sut.SaveChangesAsync(CancellationToken.None);
|
||||
Assert.False(firstSaveResult.IsFailure);
|
||||
|
||||
// stage a duplicate directly through the repository, bypassing the application level existence check, so that the unique index of the storage medium is the one that rejects it
|
||||
// Stage a duplicate directly through the repository, bypassing the application level existence check, so that the unique index of the storage medium is the one that rejects it.
|
||||
FavoriteEntity duplicateFavorite = _favoriteEntityFixture.Create(
|
||||
userId: userId,
|
||||
mediaKind: FavoriteMediaKind.MusicArtist,
|
||||
|
||||
Reference in new issue
Block a user