Skip to content
Permalink
Browse files
Whitespeace.
  • Loading branch information
garydgregory committed May 5, 2022
1 parent 021fc07 commit 9c9c28e5eb8e7f296d26642e84d6efd3dfe7833f
Showing 1 changed file with 0 additions and 17 deletions.
@@ -34,53 +34,36 @@
**/
public class ChecksumVerifyingInputStreamTest {



@Test
public void testReadTakingByteArrayThrowsIOException() throws IOException {

final Adler32 adler32 = new Adler32();
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);

}


@Test
public void testReadTakingNoArgumentsThrowsIOException() throws IOException {

final CRC32 cRC32_ = new CRC32();
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();

}


@Test
public void testSkip() throws IOException {

final CRC32 cRC32_ = new CRC32();
final byte[] byteArray = new byte[4];
final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray);
final ChecksumVerifyingInputStream checksumVerifyingInputStream = new ChecksumVerifyingInputStream(cRC32_, byteArrayInputStream, (byte)33, 2303L);
final int intOne = checksumVerifyingInputStream.read(byteArray);

final long skipReturnValue = checksumVerifyingInputStream.skip((byte)1);

assertEquals(558161692L, cRC32_.getValue());
assertEquals(0, byteArrayInputStream.available());

assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0}, byteArray);
assertEquals(0L, skipReturnValue);

}



}

0 comments on commit 9c9c28e

Please sign in to comment.