Skip to content

Commit e172823

Browse files
committed
Merge branch 'dev' into feature/get-request
2 parents aa0b2c3 + cc6e1df commit e172823

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

4242
def pomConfig = {

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

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

3+
import static org.junit.Assert.assertFalse;
4+
35
import java.io.IOException;
46
import 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
}

0 commit comments

Comments
 (0)