Skip to content

Commit 8825fdc

Browse files
committed
- replaces read all bytes by method supproted with java8
1 parent 7872665 commit 8825fdc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/test/java/com/microsoft/graph/functional/OneDriveTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.microsoft.graph.functional;
22

3-
import static org.junit.Assert.assertTrue;
3+
import static org.junit.Assert.assertFalse;
44

55
import java.io.IOException;
66
import java.io.InputStream;
@@ -82,7 +82,6 @@ public void failure(final ClientException ex) {
8282
public void testDownloadWithCustomRequest() throws IOException {
8383
final String testDownloadFileId = "01RWFXFJG3UYRHE75RZVFYWKNUEBB53H7A";
8484
final InputStream stream = testBase.graphClient.customRequest("/me/drive/items/"+testDownloadFileId+"/content", InputStream.class).buildRequest().get();
85-
final byte[] bytes = stream.readAllBytes();
86-
assertTrue("stream should not be empty", bytes.length > 0);
85+
assertFalse("stream should not be empty", stream.read() == -1);
8786
}
8887
}

0 commit comments

Comments
 (0)