[GitHub] [commons-codec] aherbert commented on a change in pull request #31: Added non-blocking File digest methods

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [commons-codec] aherbert commented on a change in pull request #31: Added non-blocking File digest methods

GitBox
aherbert commented on a change in pull request #31: Added non-blocking File digest methods
URL: https://github.com/apache/commons-codec/pull/31#discussion_r353160091
 
 

 ##########
 File path: src/test/java/org/apache/commons/codec/digest/MessageDigestAlgorithmsTest.java
 ##########
 @@ -151,6 +156,25 @@ public void testDigestFile() throws IOException {
         Assert.assertArrayEquals(digestTestData(), DigestUtils.digest(DigestUtils.getDigest(messageDigestAlgorithm),getTestFile()));
     }
 
+    @Test
+    public void testNonBlockingDigestRandomAccessFile() throws IOException {
+        Assume.assumeTrue(DigestUtils.isAvailable(messageDigestAlgorithm));
+
+        final byte[] expected = digestTestData();
+
+        Assert.assertArrayEquals(expected,
 
 Review comment:
   In keeping with the rest of the class can you reformat the assertions to a single line. The 5 lines per assertion are very explicit.

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services