Skip to content
Permalink
Browse files
Fix broken tests.
  • Loading branch information
garydgregory committed May 5, 2022
1 parent 9c9c28e commit 662bebbc0a2deb3602bc857253b4180bc31ea645
Showing 1 changed file with 3 additions and 2 deletions.
@@ -25,6 +25,7 @@

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

/**
* Unit tests for class {@link ChecksumVerifyingInputStream org.apache.commons.compress.utils.ChecksumVerifyingInputStream}.
@@ -40,7 +41,7 @@ public void testReadTakingByteArrayThrowsIOException() throws IOException {
final byte[] byteArray = new byte[3];
final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray);
final ChecksumVerifyingInputStream checksumVerifyingInputStream = new ChecksumVerifyingInputStream(adler32, byteArrayInputStream, (-1859L), (byte) (-68));
checksumVerifyingInputStream.read(byteArray);
assertThrows(IOException.class, () -> checksumVerifyingInputStream.read(byteArray));
}

@Test
@@ -49,7 +50,7 @@ public void testReadTakingNoArgumentsThrowsIOException() throws IOException {
final byte[] byteArray = new byte[9];
final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray);
final ChecksumVerifyingInputStream checksumVerifyingInputStream = new ChecksumVerifyingInputStream(cRC32_, byteArrayInputStream, (byte)1, (byte)1);
checksumVerifyingInputStream.read();
assertThrows(IOException.class, () -> checksumVerifyingInputStream.read());
}

@Test

0 comments on commit 662bebb

Please sign in to comment.