mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09: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
@@ -52,7 +52,7 @@ public class PermissionRepositoryTests
|
||||
Assert.False(result.IsFailure);
|
||||
Assert.Equal(Result.Created, result.Value);
|
||||
|
||||
// check if the permission was added to the context's ChangeTracker
|
||||
// Check if the permission was added to the context's ChangeTracker.
|
||||
EntityEntry<PermissionEntity>? addedPermission = _mockContext.ChangeTracker.Entries<PermissionEntity>()
|
||||
.FirstOrDefault(e => e.State == EntityState.Added && e.Entity.Id == permissionModel.Id);
|
||||
Assert.NotNull(addedPermission);
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ public class RolePermissionRepositoryTests
|
||||
Assert.False(result.IsFailure);
|
||||
Assert.Equal(Result.Created, result.Value);
|
||||
|
||||
// check if the role permission was added to the context's ChangeTracker
|
||||
// Check if the role permission was added to the context's ChangeTracker.
|
||||
EntityEntry<RolePermissionEntity>? addedRolePermission = _mockContext.ChangeTracker.Entries<RolePermissionEntity>()
|
||||
.FirstOrDefault(e => e.State == EntityState.Added && e.Entity.Id == rolePermissionModel.Id);
|
||||
Assert.NotNull(addedRolePermission);
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public class RoleRepositoryTests
|
||||
Assert.False(result.IsFailure);
|
||||
Assert.Equal(Result.Created, result.Value);
|
||||
|
||||
// Check if the role was added to the context's ChangeTracker
|
||||
// Check if the role was added to the context's ChangeTracker.
|
||||
EntityEntry<RoleEntity>? addedRole = _mockContext.ChangeTracker.Entries<RoleEntity>()
|
||||
.FirstOrDefault(e => e.State == EntityState.Added && e.Entity.Id == role.Id);
|
||||
Assert.NotNull(addedRole);
|
||||
|
||||
+8
-8
@@ -806,14 +806,14 @@ public class ArtistRepositoryTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("website", SortOrder.Ascending)] // the website field, ascending
|
||||
[InlineData("website", SortOrder.Descending)] // the website field, descending
|
||||
[InlineData("musicbrainzartistid", SortOrder.Ascending)] // the MusicBrainz artist Id field, ascending
|
||||
[InlineData("musicbrainzartistid", SortOrder.Descending)] // the MusicBrainz artist Id field, descending
|
||||
[InlineData("createdonutc", SortOrder.Ascending)] // the creation timestamp field, ascending
|
||||
[InlineData("createdonutc", SortOrder.Descending)] // the creation timestamp field, descending
|
||||
[InlineData("updatedonutc", SortOrder.Ascending)] // the update timestamp field, ascending
|
||||
[InlineData("updatedonutc", SortOrder.Descending)] // the update timestamp field, descending
|
||||
[InlineData("website", SortOrder.Ascending)] // The website field, ascending.
|
||||
[InlineData("website", SortOrder.Descending)] // The website field, descending.
|
||||
[InlineData("musicbrainzartistid", SortOrder.Ascending)] // The MusicBrainz artist Id field, ascending.
|
||||
[InlineData("musicbrainzartistid", SortOrder.Descending)] // The MusicBrainz artist Id field, descending.
|
||||
[InlineData("createdonutc", SortOrder.Ascending)] // The creation timestamp field, ascending.
|
||||
[InlineData("createdonutc", SortOrder.Descending)] // The creation timestamp field, descending.
|
||||
[InlineData("updatedonutc", SortOrder.Ascending)] // The update timestamp field, ascending.
|
||||
[InlineData("updatedonutc", SortOrder.Descending)] // The update timestamp field, descending.
|
||||
public async Task GetAllAsync_WhenSortedByField_ShouldOrderByFieldThenById(string sortBy, SortOrder sortOrder)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ public class UserRepositoryTests
|
||||
_mockContext.Users.Add(existingUser);
|
||||
await _mockContext.SaveChangesAsync();
|
||||
|
||||
// Create updated user with same Id but different properties
|
||||
// Create updated user with same Id but different properties.
|
||||
UserEntity updatedUser = _userEntityFixture.Create(id: existingUser.Id, username: existingUser.Username, password: "NewPassword123");
|
||||
updatedUser.TempPassword = "TempPass456";
|
||||
updatedUser.TotpSecret = "NewSecret";
|
||||
|
||||
Reference in new issue
Block a user