use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.
the class ThreadCacheTest method createChat.
@Before
public void createChat() {
view = Mockito.mock(ChatContract.view.class);
chatActivity = chatActivityRule.getActivity();
presenter = new ChatPresenter(appContext, view, chatActivity);
RequestConnect rc = new RequestConnect.Builder(socketAddress, APP_ID, serverName, TOKEN, ssoHost, platformHost, fileServer, "podSpaceServer").build();
chatListeners = new ChatListener() {
@Override
public void onChatState(String state) {
if (state.equals(CHAT_READY)) {
resumeProcess();
}
}
};
chat.addListener(chatListeners);
chat.connect(rc);
chat.isCacheables(CACHE);
pauseProcess();
}
use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.
the class IntegrationTest method createChat.
@Before
public void createChat() {
Looper.prepare();
view = Mockito.mock(ChatContract.view.class);
chatActivity = chatActivityRule.getActivity();
presenter = new ChatPresenter(appContext, view, chatActivity);
RequestConnect rc = new RequestConnect.Builder(socketAddress, APP_ID, serverName, TOKEN, ssoHost, platformHost, fileServer, podSpaceServer).build();
chatListeners = new ChatListener() {
@Override
public void onChatState(String state) {
if (state.equals(CHAT_READY)) {
resumeProcess();
}
}
};
chat.addListener(chatListeners);
chat.connect(rc);
chat.isCacheables(CACHE);
pauseProcess();
}
use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.
the class LocalChatTest method setUp.
@Before
public void setUp() {
Looper.prepare();
appContext = InstrumentationRegistry.getTargetContext();
MockitoAnnotations.initMocks(this);
presenter = new ChatPresenter(appContext, view, activy);
presenter.connect(socketAddres, appId, serverName, TOKEN, ssoHost, platformHost, fileServer, TYPE_CODE);
}
use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.
the class HashTagCacheTest method createChat.
@Before
public void createChat() {
view = Mockito.mock(ChatContract.view.class);
chatActivity = chatActivityRule.getActivity();
presenter = new ChatPresenter(appContext, view, chatActivity);
RequestConnect rc = new RequestConnect.Builder(socketAddress, APP_ID, serverName, TOKEN, ssoHost, platformHost, fileServer, "podSpaceServer").build();
chatListeners = new ChatListener() {
@Override
public void onChatState(String state) {
if (state.equals(CHAT_READY)) {
resumeProcess();
}
}
};
chat.addListener(chatListeners);
chat.connect(rc);
chat.isCacheables(CACHE);
pauseProcess();
}
Aggregations