File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/test/java/com/thealgorithms/ciphers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,12 @@ public class MonoAlphabeticTest {
14
14
@ MethodSource ("provideTestData" )
15
15
public void testEncryptDecrypt (String plainText , String key , String encryptedText ) {
16
16
// 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 );
18
19
19
20
// 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 );
21
23
}
22
24
23
25
// Provide test data for both encryption and decryption
You can’t perform that action at this time.
0 commit comments