use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class DeleteTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
this.calendarId = "calendar.013123";
this.responseQueue = new LinkedBlockingQueue<LiveOperation>();
this.queueingListener = new OperationQueueingListener(this.exceptionQueue, this.responseQueue);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class FileOperationApiTest method testAsyncResponseBodyValid.
@Override
public void testAsyncResponseBodyValid() throws Throwable {
this.loadValidResponseBody();
String requestPath = "file.123123";
String destination = "file.123109";
this.runTestOnUiThread(createAsyncRunnable(requestPath, destination));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
this.checkReturnedOperations(fromMethod, fromCallback);
this.checkOperationMembers(fromMethod, this.getMethod(), requestPath);
this.checkValidResponseBody(fromMethod);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class UploadTest method testAsyncResponseBodyValid.
@Override
public void testAsyncResponseBodyValid() throws Throwable {
this.loadUploadLocationResponseBody();
this.loadValidResponseBody();
String requestPath = Paths.ME_SKYDRIVE;
this.runTestOnUiThread(createAsyncRunnable(requestPath, FILENAME, FILE));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
this.checkReturnedOperations(fromMethod, fromCallback);
this.checkOperationMembers(fromMethod, getMethod(), requestPath);
this.checkValidResponseBody(fromMethod);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class UploadTest method testAsyncResponseBodyValidWithUserState.
@Override
public void testAsyncResponseBodyValidWithUserState() throws Throwable {
this.loadUploadLocationResponseBody();
this.loadValidResponseBody();
String requestPath = Paths.ME_SKYDRIVE;
Object userState = new Object();
this.runTestOnUiThread(createAsyncRunnable(requestPath, FILENAME, 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 UploadTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
// some upload requests perform two http requests, so clear any responses that may have
// been entered already. each test here is responsible for loading 1 or two responses.
this.mockClient.clearHttpResponseQueue();
this.responseQueue = new LinkedBlockingQueue<LiveOperation>();
this.queueingListener = new UploadOperationQueueingListener(this.exceptionQueue, this.responseQueue);
}
Aggregations