Skip to content

Commit 82ecc32

Browse files
authored
Update MonoAlphabeticTest.java
1 parent b94f1f9 commit 82ecc32

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/java/com/thealgorithms/ciphers/MonoAlphabeticTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ public class MonoAlphabeticTest {
1414
@MethodSource("provideTestData")
1515
public void testEncryptDecrypt(String plainText, String key, String encryptedText) {
1616
// Test encryption
17-
assertEquals(encryptedText, MonoAlphabetic.encrypt(plainText, key));
17+
String actualEncrypted = MonoAlphabetic.encrypt(plainText, key);
18+
assertEquals(encryptedText, actualEncrypted, "Encryption failed for input: " + plainText + " with key: " + key);
1819

1920
// Test decryption
20-
assertEquals(plainText, MonoAlphabetic.decrypt(encryptedText, key));
21+
String actualDecrypted = MonoAlphabetic.decrypt(encryptedText, key);
22+
assertEquals(plainText, actualDecrypted, "Decryption failed for input: " + encryptedText + " with key: " + key);
2123
}
2224

2325
// Provide test data for both encryption and decryption

0 commit comments

Comments
 (0)