Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------

package com.microsoft.graph.extensions;

import android.test.AndroidTestCase;

import java.lang.reflect.Method;

/**
* Created by pnied on 8/9/2016.
*/
public class IDriveItemRequestBuilderTests extends AndroidTestCase {

public void testGetItemWithPath() throws Exception {
final Method getItemWithPath = IDriveItemRequestBuilder.class.getDeclaredMethod("getItemWithPath", String.class);
assertNotNull(getItemWithPath);
assertEquals(IDriveItemRequestBuilder.class, getItemWithPath.getReturnType());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------

package com.microsoft.graph.extensions;

import android.test.AndroidTestCase;

import java.lang.reflect.Method;

/**
* Created by pnied on 8/9/2016.
*/
public class IThumbnailSetRequestBuilderTests extends AndroidTestCase {

public void testGetThumbnailSize() throws Exception {
final Method getThumbnailSize = IThumbnailSetRequestBuilder.class.getDeclaredMethod("getThumbnailSize", String.class);
assertNotNull(getThumbnailSize);
assertEquals(IThumbnailRequestBuilder.class, getThumbnailSize.getReturnType());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ public class DriveItemRequestBuilder extends BaseDriveItemRequestBuilder impleme
public DriveItemRequestBuilder(final String requestUrl, final IBaseClient client, final List<Option> options) {
super(requestUrl, client, options);
}

public IDriveItemRequestBuilder getItemWithPath(final String path) {
return new DriveItemRequestBuilder(getRequestUrl() + ":/" + path + ":", getClient(), null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@
*/
public interface IDriveItemRequestBuilder extends IBaseDriveItemRequestBuilder {

/**
* Gets the item request builder for the specified item path
* @param path The path to the item
* @return The request builder for the specified item
*/
IDriveItemRequestBuilder getItemWithPath(final String path);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@
*/
public interface IThumbnailSetRequestBuilder extends IBaseThumbnailSetRequestBuilder {


/**
* Gets a request for a thumbnail of a specific size
* @param size The size to request (typically: small, medium, large)
* @return The request builder for that thumbnail size
*/
IThumbnailRequestBuilder getThumbnailSize(final String size);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@ public class ThumbnailSetRequestBuilder extends BaseThumbnailSetRequestBuilder i
public ThumbnailSetRequestBuilder(final String requestUrl, final IBaseClient client, final List<Option> options) {
super(requestUrl, client, options);
}

@Override
public IThumbnailRequestBuilder getThumbnailSize(final String size) {
return new ThumbnailRequestBuilder(getRequestUrlWithAdditionalSegment(size), getClient(), /* options */ null);
}
}