mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 02: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
+1
-1
@@ -133,7 +133,7 @@ public class BookMappingTests
|
||||
entity.ApplyMetadataToEntity(book);
|
||||
|
||||
// Assert
|
||||
// the identity and the collection columns are not part of the metadata application
|
||||
// The identity and the collection columns are not part of the metadata application.
|
||||
Assert.Equal(entityId, entity.Id);
|
||||
Assert.Equal(libraryId, entity.LibraryId);
|
||||
Assert.Equal(path, entity.Path);
|
||||
|
||||
+3
-3
@@ -73,9 +73,9 @@ public class BookMetadataDtoMappingTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // missing title
|
||||
[InlineData("")] // empty title
|
||||
[InlineData(" ")] // whitespace title
|
||||
[InlineData(null)] // Missing title.
|
||||
[InlineData("")] // Empty title.
|
||||
[InlineData(" ")] // Whitespace title.
|
||||
public void ApplyMetadata_WhenTitleIsNullOrWhitespace_ShouldReturnTitleCannotBeEmptyError(string? title)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+2
-2
@@ -104,13 +104,13 @@ public class BookRatingDtoMappingTests
|
||||
foreach (Result<BookRating> result in resultList)
|
||||
Assert.False(result.IsFailure);
|
||||
|
||||
// complete rating
|
||||
// Complete rating.
|
||||
Assert.Equal(dtos[0].Value!.Value, resultList[0].Value.Value);
|
||||
Assert.Equal(dtos[0].MaxValue!.Value, resultList[0].Value.MaxValue);
|
||||
Assert.Equal(dtos[0].Source!.Value, resultList[0].Value.Source.Value);
|
||||
Assert.Equal(dtos[0].VoteCount!.Value, resultList[0].Value.VoteCount.Value);
|
||||
|
||||
// minimal rating
|
||||
// Minimal rating.
|
||||
Assert.Equal(dtos[1].Value!.Value, resultList[1].Value.Value);
|
||||
Assert.Equal(dtos[1].MaxValue!.Value, resultList[1].Value.MaxValue);
|
||||
Assert.False(resultList[1].Value.Source.HasValue);
|
||||
|
||||
+3
-3
@@ -92,19 +92,19 @@ public class BookRatingMappingTests
|
||||
|
||||
List<BookRatingEntity> resultList = [.. results];
|
||||
|
||||
// complete rating
|
||||
// Complete rating.
|
||||
Assert.Equal(bookRatings[0].Value, resultList[0].Value);
|
||||
Assert.Equal(bookRatings[0].MaxValue, resultList[0].MaxValue);
|
||||
Assert.Equal(bookRatings[0].Source.Value, resultList[0].Source);
|
||||
Assert.Equal(bookRatings[0].VoteCount.Value, resultList[0].VoteCount);
|
||||
|
||||
// rating without source
|
||||
// Rating without source.
|
||||
Assert.Equal(bookRatings[1].Value, resultList[1].Value);
|
||||
Assert.Equal(bookRatings[1].MaxValue, resultList[1].MaxValue);
|
||||
Assert.Null(resultList[1].Source);
|
||||
Assert.Equal(bookRatings[1].VoteCount.Value, resultList[1].VoteCount);
|
||||
|
||||
// rating without vote count
|
||||
// Rating without vote count.
|
||||
Assert.Equal(bookRatings[2].Value, resultList[2].Value);
|
||||
Assert.Equal(bookRatings[2].MaxValue, resultList[2].MaxValue);
|
||||
Assert.Equal(bookRatings[2].Source.Value, resultList[2].Source);
|
||||
|
||||
+2
-2
@@ -66,7 +66,7 @@ public class IsbnDtoMappingTests
|
||||
Assert.False(result.IsFailure);
|
||||
Assert.NotNull(result.Value);
|
||||
Assert.Equal(dto.Value, result.Value.Value);
|
||||
Assert.Equal(IsbnFormat.Isbn13, result.Value.Format); // default format
|
||||
Assert.Equal(IsbnFormat.Isbn13, result.Value.Format); // Default format.
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -110,7 +110,7 @@ public class IsbnDtoMappingTests
|
||||
Assert.Equal(dtos[1].Format!.Value, resultList[1].Value.Format);
|
||||
|
||||
Assert.Equal(dtos[2].Value, resultList[2].Value.Value);
|
||||
Assert.Equal(IsbnFormat.Isbn13, resultList[2].Value.Format); // default format
|
||||
Assert.Equal(IsbnFormat.Isbn13, resultList[2].Value.Format); // Default format.
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in new issue
Block a user