use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class PostTest method testAsyncResponseBodyValidWithUserState.
@Override
public void testAsyncResponseBodyValidWithUserState() throws Throwable {
this.loadValidResponseBody();
Object userState = new Object();
String requestPath = Paths.ME_CALENDARS;
this.runTestOnUiThread(createAsyncRunnable(requestPath, CALENDAR, userState));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
this.checkReturnedOperations(fromMethod, fromCallback);
this.checkOperationMembers(fromMethod, METHOD, requestPath, userState);
this.checkValidResponseBody(fromMethod);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class UploadTest method testAsyncResponseBodyInvalid.
@Override
public void testAsyncResponseBodyInvalid() throws Throwable {
this.loadInvalidResponseBody();
String requestPath = Paths.ME_SKYDRIVE;
this.runTestOnUiThread(createAsyncRunnable(requestPath, FILENAME, FILE));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
LiveOperationException exception = this.pollExceptionQueue();
this.checkReturnedException(fromMethod, fromCallback, exception);
this.checkOperationMembers(fromMethod, getMethod(), requestPath);
this.checkResponseBodyInvalid(fromMethod);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class UploadTest method testSyncResponseBodyValidWithOverwrite.
public void testSyncResponseBodyValidWithOverwrite() throws Exception {
this.loadUploadLocationResponseBody();
this.loadValidResponseBody();
String requestPath = Paths.ME_SKYDRIVE;
LiveOperation operation = this.liveConnectClient.upload(requestPath, FILENAME, FILE, OverwriteOption.Overwrite);
this.checkOperationMembers(operation, getMethod(), requestPath);
this.checkValidResponseBody(operation);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class UploadTest method testAsyncResponseBodyValidWithOverwrite.
public void testAsyncResponseBodyValidWithOverwrite() throws Throwable {
this.loadUploadLocationResponseBody();
this.loadValidResponseBody();
String requestPath = Paths.ME_SKYDRIVE;
Object userState = new Object();
this.runTestOnUiThread(createAsyncRunnable(requestPath, FILENAME, OverwriteOption.Overwrite, FILE, userState));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
this.checkReturnedOperations(fromMethod, fromCallback);
this.checkOperationMembers(fromMethod, getMethod(), requestPath, userState);
this.checkValidResponseBody(fromMethod);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class PutTest method testAsyncResponseBodyValidWithUserState.
@Override
public void testAsyncResponseBodyValidWithUserState() throws Throwable {
this.loadValidResponseBody();
Object userState = new Object();
String requestPath = this.calendarId;
this.runTestOnUiThread(createAsyncRunnable(requestPath, CALENDAR, userState));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
this.checkReturnedOperations(fromMethod, fromCallback);
this.checkOperationMembers(fromMethod, METHOD, requestPath, userState);
this.checkValidResponseBody(fromMethod);
}
Aggregations