@Test public void shouldCompletePhotoUploadRequestSucessfully() throws Exception { final PhotoUploadRequest request = getStubPhotoUploadRequest(); final BVConversationsClient client = clientRule.getClient(); clientRule.enqueueHttp200("photo_upload_response.json"); LoadCallProgressiveSubmission<PhotoUploadRequest, PhotoUploadResponse> loadCallProgressiveSubmission = client.prepareCall(request); loadCallProgressiveSubmission.loadAsync(new ConversationsSubmissionCallback<PhotoUploadResponse>() { @Override public void onSuccess(@NonNull PhotoUploadResponse response) { assertNotNull(response); assertNotNull(response.getPhoto()); assertNotNull(response.getPhoto().getContent()); assertNotNull(response.getPhoto().getContent().getNormalUrl()); assertNotNull(response.getPhoto().getContent().getThumbnailUrl()); assertEquals("normalurl",response.getPhoto().getContent().getNormalUrl()); assertEquals("thumbnailurl",response.getPhoto().getContent().getThumbnailUrl()); } @Override public void onFailure(@NonNull ConversationsSubmissionException exception) { fail(); } }); }
@Override @Deprecated public void loadAsync(ConversationsCallback<ResponseType> conversationsCallback) { BVSDK.getInstance().bvLogger.v(TAG, "Beginning of async request"); checkMain(); this.conversationsCallback = conversationsCallback; displayWorkerHandler.sendEmptyMessage(0); }
LoadCallProgressiveSubmission extends LoadCall<RequestType, ResponseType> { @Override @Deprecated public void loadAsync(ConversationsCallback<ResponseType> conversationsCallback) { BVSDK.getInstance().bvLogger.v(TAG, "Beginning of async request"); checkMain(); this.conversationsCallback = conversationsCallback; displayWorkerHandler.sendEmptyMessage(0); } }
LoadCallProgressiveSubmission extends LoadCall<RequestType, ResponseType> { @Override @Deprecated public void loadAsync(ConversationsCallback<ResponseType> conversationsCallback) { BVSDK.getInstance().bvLogger.v(TAG, "Beginning of async request"); checkMain(); this.conversationsCallback = conversationsCallback; displayWorkerHandler.sendEmptyMessage(0); } LoadCallProgressiveSubmission(
            RequestType request,
            Class<ResponseType> responseTypeClass,
            ConversationsAnalyticsManager conversationsAnalyticsManager,
            Looper uiLooper,
            Looper bgLooper,
            OkHttpClient okHttpClient,
            Gson gson,
            Call call); }
LoadCallProgressiveSubmission extends LoadCall<RequestType, ResponseType> { @Override @Deprecated public void loadAsync(ConversationsCallback<ResponseType> conversationsCallback) { BVSDK.getInstance().bvLogger.v(TAG, "Beginning of async request"); checkMain(); this.conversationsCallback = conversationsCallback; displayWorkerHandler.sendEmptyMessage(0); } LoadCallProgressiveSubmission(
            RequestType request,
            Class<ResponseType> responseTypeClass,
            ConversationsAnalyticsManager conversationsAnalyticsManager,
            Looper uiLooper,
            Looper bgLooper,
            OkHttpClient okHttpClient,
            Gson gson,
            Call call); @Override @WorkerThread ResponseType loadSync(); @Override @Deprecated /** * @deprecated Use {@link #loadAsync(ConversationsSubmissionCallback)} instead */ void loadAsync(ConversationsCallback<ResponseType> conversationsCallback); @MainThread void loadAsync(@NonNull ConversationsSubmissionCallback<ResponseType> conversationsCallback); }
LoadCallProgressiveSubmission extends LoadCall<RequestType, ResponseType> { @Override @Deprecated public void loadAsync(ConversationsCallback<ResponseType> conversationsCallback) { BVSDK.getInstance().bvLogger.v(TAG, "Beginning of async request"); checkMain(); this.conversationsCallback = conversationsCallback; displayWorkerHandler.sendEmptyMessage(0); } LoadCallProgressiveSubmission(
            RequestType request,
            Class<ResponseType> responseTypeClass,
            ConversationsAnalyticsManager conversationsAnalyticsManager,
            Looper uiLooper,
            Looper bgLooper,
            OkHttpClient okHttpClient,
            Gson gson,
            Call call); @Override @WorkerThread ResponseType loadSync(); @Override @Deprecated /** * @deprecated Use {@link #loadAsync(ConversationsSubmissionCallback)} instead */ void loadAsync(ConversationsCallback<ResponseType> conversationsCallback); @MainThread void loadAsync(@NonNull ConversationsSubmissionCallback<ResponseType> conversationsCallback); static final String TAG; }