aremily commented on a change in pull request #99:
URL: https://github.com/apache/commons-crypto/pull/99#discussion_r418956700
##########
File path:
src/test/java/org/apache/commons/crypto/stream/AbstractCipherStreamTest.java
##########
@@ -197,46 +224,246 @@ protected void doByteBufferRead(final String
cipherClass, final boolean withChan
getCipher(cipherClass), smallBufferSize, iv, withChannel);
buf.clear();
byteBufferReadCheck(in, buf, 11);
+ in.close();
+
+ // Direct buffer, default buffer size, initial buffer position is 0,
final read
Review comment:
Nice catch. The comment is a copy-paste oversight and I'll fix it. I
agree that these tests are largely redundant. I needed to run different
constructors and branch into some final logic in the read method to increase
the code coverage. I added a test that forced the read method to branch. Then
I just ran the tests again using a getCryptoInputSteam method that called
different constructors. It is a bit overkill, but I don't think it does any
harm to run each test again against a separate constructor, as opposed to
simply picking one test at random to cover the additional constructors.
----------------------------------------------------------------
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]