use of com.fanap.podchat.requestobject.RequestGetUserRoles in project pod-chat-android-sdk by FanapSoft.
the class ThreadManager method safeLeaveThread.
public static void safeLeaveThread(SafeLeaveRequest request, String uniqueId, ISafeLeaveCallback callback) {
requestUniqueId = uniqueId;
if (request.getSuccessorParticipantId() == 0) {
createAndSendNormalLeave(request, uniqueId, callback);
} else {
RequestGetUserRoles requestGetUserRoles = new RequestGetUserRoles.Builder().setThreadId(request.getThreadId()).withNoCache().build();
userRolesSubscriber = PublishSubject.create();
userRolesSubscription = userRolesSubscriber.subscribe(createOnReceiveUserRolesAction(request, uniqueId, callback));
callback.onGetUserRolesNeeded(requestGetUserRoles, uniqueId);
}
}
use of com.fanap.podchat.requestobject.RequestGetUserRoles in project pod-chat-android-sdk by FanapSoft.
the class ChatTest method getCurrentUserRoles.
public void getCurrentUserRoles(long threadID) {
RequestGetUserRoles req = new RequestGetUserRoles.Builder().setThreadId(threadID).build();
presenter.getUserRoles(req);
sleep(1000);
Mockito.verify(view, Mockito.atLeastOnce()).onGetCurrentUserRoles(Mockito.any());
}
use of com.fanap.podchat.requestobject.RequestGetUserRoles in project pod-chat-android-sdk by FanapSoft.
the class ChatTest method getCurrentUserRoles.
@Test
@LargeTest
public void getCurrentUserRoles() {
RequestGetUserRoles req = new RequestGetUserRoles.Builder().setThreadId(5801).build();
chat.getCurrentUserRoles(req);
sleep(1000);
// Mockito.verify(view, Mockito.atLeastOnce()).onGetCurrentUserRoles(Mockito.any());
Mockito.verify(chatListeners, Mockito.atLeastOnce()).onError(Mockito.any(), Mockito.any());
}
use of com.fanap.podchat.requestobject.RequestGetUserRoles in project pod-chat-android-sdk by FanapSoft.
the class ChatTestIntegration method getCurrentUserRoles.
public void getCurrentUserRoles(long threadID) {
RequestGetUserRoles req = new RequestGetUserRoles.Builder().setThreadId(threadID).build();
presenter.getUserRoles(req);
sleep(1000);
Mockito.verify(view, Mockito.atLeastOnce()).onGetCurrentUserRoles(Mockito.any());
}
use of com.fanap.podchat.requestobject.RequestGetUserRoles in project pod-chat-android-sdk by FanapSoft.
the class ChatTestSandbox method getCurrentUserRoles.
public void getCurrentUserRoles(long threadID) {
RequestGetUserRoles req = new RequestGetUserRoles.Builder().setThreadId(threadID).build();
presenter.getUserRoles(req);
sleep(1000);
Mockito.verify(view, Mockito.atLeastOnce()).onGetCurrentUserRoles(Mockito.any());
}
Aggregations