use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class FileOperationApiTest method testAsyncResponseBodyValidWithUserState.
@Override
public void testAsyncResponseBodyValidWithUserState() throws Throwable {
this.loadValidResponseBody();
String requestPath = "file.123123";
String destination = "file.123109";
Object userState = new Object();
this.runTestOnUiThread(createAsyncRunnable(requestPath, destination, userState));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
this.checkReturnedOperations(fromMethod, fromCallback);
this.checkOperationMembers(fromMethod, this.getMethod(), requestPath, userState);
this.checkValidResponseBody(fromMethod);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class FileOperationApiTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
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 testAsyncResponseBodyInvalid.
@Override
public void testAsyncResponseBodyInvalid() throws Throwable {
this.loadInvalidResponseBody();
String requestPath = "file.123123";
String destination = "file.123109";
this.runTestOnUiThread(createAsyncRunnable(requestPath, destination));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
LiveOperationException exception = this.pollExceptionQueue();
this.checkReturnedException(fromMethod, fromCallback, exception);
this.checkOperationMembers(fromMethod, this.getMethod(), requestPath);
this.checkResponseBodyInvalid(fromMethod);
}
use of com.microsoft.live.LiveOperation in project LiveSDK-for-Android by liveservices.
the class JsonEnclosingApiTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
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 DeleteTest method testAsyncResponseBodyValidWithUserState.
@Override
public void testAsyncResponseBodyValidWithUserState() throws Throwable {
this.loadValidResponseBody();
Object userState = new Object();
String requestPath = this.calendarId;
this.runTestOnUiThread(createAsyncRunnable(requestPath, userState));
LiveOperation fromMethod = this.responseQueue.take();
LiveOperation fromCallback = this.pollResponseQueue();
this.checkReturnedOperations(fromMethod, fromCallback);
this.checkOperationMembers(fromMethod, METHOD, requestPath, userState);
this.checkValidResponseBody(fromMethod);
}
Aggregations