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
+2
-2
@@ -116,7 +116,7 @@ public class CryptographyServiceTests
|
||||
public void Decrypt_WhenInputIsTooShort_ShouldThrowArgumentException()
|
||||
{
|
||||
// Arrange
|
||||
string shortCiphertext = Convert.ToBase64String(new byte[8]); // less than required 16 bytes
|
||||
string shortCiphertext = Convert.ToBase64String(new byte[8]); // Less than required 16 bytes.
|
||||
|
||||
// Act
|
||||
Action act = () => _sut.Decrypt(shortCiphertext);
|
||||
@@ -135,7 +135,7 @@ public class CryptographyServiceTests
|
||||
|
||||
// Decode the Base64 string, modify one byte, then re-encode.
|
||||
byte[] encryptedBytes = Convert.FromBase64String(encrypted);
|
||||
encryptedBytes[^1] ^= 0xFF; // flip all bits in the last byte
|
||||
encryptedBytes[^1] ^= 0xFF; // Flip all bits in the last byte.
|
||||
string corrupted = Convert.ToBase64String(encryptedBytes);
|
||||
|
||||
// Act
|
||||
|
||||
@@ -57,7 +57,7 @@ public class HashServiceTests
|
||||
// Assert
|
||||
Assert.NotNull(hash);
|
||||
Assert.NotEmpty(hash);
|
||||
// verify it's a valid Base64 string
|
||||
// Verify it's a valid Base64 string.
|
||||
Assert.NotNull(Convert.FromBase64String(hash));
|
||||
}
|
||||
|
||||
@@ -92,8 +92,8 @@ public class HashServiceTests
|
||||
|
||||
[Theory]
|
||||
[InlineData("")]
|
||||
[InlineData("dGVzdA==")] // valid base64 but wrong length
|
||||
[InlineData("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=")] // valid base64 but wrong length
|
||||
[InlineData("dGVzdA==")] // Valid base64 but wrong length.
|
||||
[InlineData("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=")] // Valid base64 but wrong length.
|
||||
public void CheckStringAgainstHash_WhenHashIsInvalidLength_ShouldReturnFalse(string invalidHash)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
Reference in new issue
Block a user