[ 
https://issues.apache.org/jira/browse/CRYPTO-151?focusedWorklogId=523459&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-523459
 ]

ASF GitHub Bot logged work on CRYPTO-151:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Dec/20 19:26
            Start Date: 12/Dec/20 19:26
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on a change in pull request #114:
URL: https://github.com/apache/commons-crypto/pull/114#discussion_r541744144



##########
File path: 
src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
##########
@@ -251,13 +247,13 @@ private void byteArrayTest(final String transformation, 
final byte[] key, final
                final int n = enc.doFinal(input, 0, input.length, temp, 0);
                final byte[] cipherText = new byte[n];
                System.arraycopy(temp, 0, cipherText, 0, n);
-               Assert.assertArrayEquals("byte array encryption error.", 
output, cipherText);
+               assertArrayEquals( output, cipherText);

Review comment:
       You lost the assertion message and the formatting should match the rest 
of the code.

##########
File path: 
src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
##########
@@ -220,9 +218,7 @@ private void byteBufferTest(final String transformation, 
final byte[] key, final
                                final byte[] b = new byte[output.remaining()];
                                output.get(b);
                                final byte[] c = new 
byte[encResult.remaining()];
-                               encResult.get(c);
-                               Assert.fail("AES failed encryption - expected " 
+ new String(DatatypeConverter.printHexBinary(b))
-                                               + " got " + new 
String(DatatypeConverter.printHexBinary(c)));
+                               assertThrows(IllegalArgumentException.class, () 
-> encResult.get(c));

Review comment:
       Please preserve the assertion message, it will be handy when the test 
fails.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 523459)
    Time Spent: 2h 40m  (was: 2.5h)

> Migrate to Junit 5
> ------------------
>
>                 Key: CRYPTO-151
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-151
>             Project: Commons Crypto
>          Issue Type: Improvement
>    Affects Versions: 1.1.0
>            Reporter: Arturo Bernal
>            Priority: Minor
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to