File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/test/java/com/thealgorithms/ciphers Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,7 @@ void encryptWithMismatchedKeyLengthThrowsException() {
3333 byte [] data = "hello" .getBytes (StandardCharsets .UTF_8 );
3434 byte [] shortKey = OneTimePadCipher .generateKey (2 );
3535
36- assertThrows (
37- IllegalArgumentException .class ,
38- () -> OneTimePadCipher .encrypt (data , shortKey ));
36+ assertThrows (IllegalArgumentException .class , () -> OneTimePadCipher .encrypt (data , shortKey ));
3937 }
4038
4139 @ Test
@@ -46,8 +44,6 @@ void decryptWithMismatchedKeyLengthThrowsException() {
4644
4745 byte [] wrongSizedKey = OneTimePadCipher .generateKey (data .length + 1 );
4846
49- assertThrows (
50- IllegalArgumentException .class ,
51- () -> OneTimePadCipher .decrypt (ciphertext , wrongSizedKey ));
47+ assertThrows (IllegalArgumentException .class , () -> OneTimePadCipher .decrypt (ciphertext , wrongSizedKey ));
5248 }
5349}
You can’t perform that action at this time.
0 commit comments