File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
src/test/java/com/microsoft/graph/functional Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ dependencies {
3636 implementation ' com.squareup.okhttp3:okhttp:3.12.1'
3737
3838 // Core Http library
39- implementation ' com.microsoft.graph:microsoft-graph-core:1.0.2 '
39+ implementation ' com.microsoft.graph:microsoft-graph-core:1.0.3 '
4040}
4141
4242def pomConfig = {
Original file line number Diff line number Diff line change 11package com .microsoft .graph .functional ;
22
3+ import static org .junit .Assert .assertFalse ;
4+
35import java .io .IOException ;
46import java .io .InputStream ;
57
@@ -32,7 +34,7 @@ public void setUp() {
3234 * @throws InterruptedException if the chunked upload fails
3335 */
3436 @ Test
35- public void testLargeFileUpload () throws IOException , InterruptedException {
37+ public void testLargeFileUpload () throws IOException , InterruptedException {
3638 String itemId = "01BQHXQL5GQVAGCFJLYRH3EAG2YHGERMQA" ; //Test upload folder
3739
3840 //Get resource file from file system
@@ -67,7 +69,6 @@ public void failure(final ClientException ex) {
6769 .createUploadSession (new DriveItemUploadableProperties ())
6870 .buildRequest ()
6971 .post ();
70-
7172 ChunkedUploadProvider <DriveItem > chunkedUploadProvider = new ChunkedUploadProvider <DriveItem >(
7273 uploadSession ,
7374 testBase .graphClient ,
@@ -77,5 +78,11 @@ public void failure(final ClientException ex) {
7778
7879 chunkedUploadProvider .upload (callback );
7980 }
80-
81+ @ Test
82+ public void testDownloadWithCustomRequest () throws IOException {
83+ final String testDownloadFileId = "01RWFXFJG3UYRHE75RZVFYWKNUEBB53H7A" ;
84+ try (final InputStream stream = testBase .graphClient .customRequest ("/me/drive/items/" +testDownloadFileId +"/content" , InputStream .class ).buildRequest ().get ()) {
85+ assertFalse ("stream should not be empty" , stream .read () == -1 );
86+ }
87+ }
8188}
You can’t perform that action at this time.
0 commit comments