Search in sources :

Example 1 with LiveDownloadOperation

use of com.microsoft.live.LiveDownloadOperation in project LiveSDK-for-Android by liveservices.

the class DownloadTest method testAsyncResponseBodyValid.

@Override
public void testAsyncResponseBodyValid() throws Throwable {
    this.loadValidResponseBody();
    String requestPath = VALID_PATH;
    this.runTestOnUiThread(this.createAsyncRunnable(requestPath));
    LiveDownloadOperation fromMethod = this.responseQueue.take();
    LiveDownloadOperation fromCallback = this.pollResponseQueue();
    this.checkReturnedOperations(fromMethod, fromCallback);
    this.checkOperationMembers(fromMethod, this.getMethod(), requestPath);
    this.checkValidResponseBody(fromMethod);
}
Also used : LiveDownloadOperation(com.microsoft.live.LiveDownloadOperation)

Example 2 with LiveDownloadOperation

use of com.microsoft.live.LiveDownloadOperation in project LiveSDK-for-Android by liveservices.

the class DownloadTest method testSyncResponseBodyInvalid.

@Override
public void testSyncResponseBodyInvalid() throws Exception {
    this.loadInvalidResponseBody();
    String requestPath = VALID_PATH;
    LiveDownloadOperation operation = this.liveConnectClient.download(requestPath);
    this.checkOperationMembers(operation, this.getMethod(), requestPath);
    this.checkResponseBodyInvalid(operation);
}
Also used : LiveDownloadOperation(com.microsoft.live.LiveDownloadOperation)

Example 3 with LiveDownloadOperation

use of com.microsoft.live.LiveDownloadOperation in project LiveSDK-for-Android by liveservices.

the class DownloadTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    this.responseQueue = new LinkedBlockingQueue<LiveDownloadOperation>();
    this.queueingListener = new DownloadOperationQueueingListener(this.exceptionQueue, this.responseQueue);
}
Also used : DownloadOperationQueueingListener(com.microsoft.live.test.util.DownloadOperationQueueingListener) LiveDownloadOperation(com.microsoft.live.LiveDownloadOperation)

Example 4 with LiveDownloadOperation

use of com.microsoft.live.LiveDownloadOperation in project LiveSDK-for-Android by liveservices.

the class DownloadTest method testAsyncResponseBodyValidWithUserState.

@Override
public void testAsyncResponseBodyValidWithUserState() throws Throwable {
    this.loadValidResponseBody();
    String requestPath = VALID_PATH;
    Object userState = new Object();
    this.runTestOnUiThread(this.createAsyncRunnable(requestPath, userState));
    LiveDownloadOperation fromMethod = this.responseQueue.take();
    LiveDownloadOperation fromCallback = this.pollResponseQueue();
    this.checkReturnedOperations(fromMethod, fromCallback);
    this.checkOperationMembers(fromMethod, this.getMethod(), requestPath, userState);
    this.checkValidResponseBody(fromMethod);
}
Also used : LiveDownloadOperation(com.microsoft.live.LiveDownloadOperation)

Example 5 with LiveDownloadOperation

use of com.microsoft.live.LiveDownloadOperation in project LiveSDK-for-Android by liveservices.

the class DownloadTest method testSyncResponseBodyValid.

@Override
public void testSyncResponseBodyValid() throws Exception {
    this.loadValidResponseBody();
    String requestPath = VALID_PATH;
    LiveDownloadOperation operation = this.liveConnectClient.download(requestPath);
    this.checkOperationMembers(operation, this.getMethod(), requestPath);
    this.checkValidResponseBody(operation);
}
Also used : LiveDownloadOperation(com.microsoft.live.LiveDownloadOperation)

Aggregations

LiveDownloadOperation (com.microsoft.live.LiveDownloadOperation)8 OnClickListener (android.view.View.OnClickListener)2 LiveDownloadOperationListener (com.microsoft.live.LiveDownloadOperationListener)2 LiveOperationException (com.microsoft.live.LiveOperationException)2 AlertDialog (android.app.AlertDialog)1 Dialog (android.app.Dialog)1 ProgressDialog (android.app.ProgressDialog)1 DialogInterface (android.content.DialogInterface)1 OnCancelListener (android.content.DialogInterface.OnCancelListener)1 OnDismissListener (android.content.DialogInterface.OnDismissListener)1 View (android.view.View)1 TextView (android.widget.TextView)1 LiveAuthClient (com.microsoft.live.LiveAuthClient)1 LiveAuthException (com.microsoft.live.LiveAuthException)1 LiveAuthListener (com.microsoft.live.LiveAuthListener)1 LiveConnectClient (com.microsoft.live.LiveConnectClient)1 LiveConnectSession (com.microsoft.live.LiveConnectSession)1 LiveOperation (com.microsoft.live.LiveOperation)1 LiveOperationListener (com.microsoft.live.LiveOperationListener)1 LiveStatus (com.microsoft.live.LiveStatus)1