Search in sources :

Example 6 with ChatPresenter

use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.

the class ChatTestSandbox method setUp.

@Before
public void setUp() {
    // Looper.prepare();
    // appContext = InstrumentationRegistry.getTargetContext();
    // MockitoAnnotations.initMocks(this);
    chatActivity = chatActivityRule.getActivity();
    presenter = new ChatPresenter(appContext, view, chatActivity);
// RequestConnect rc = new RequestConnect.Builder(
// socketAddress,
// APP_ID,
// serverName,
// "f29512343de1472fa15d1e497e264c54",
// ssoHost,
// platformHost,
// fileServer,
// "podSpaceServer")
// .build();
// presenter.connect(rc);
}
Also used : ChatPresenter(com.example.chat.application.chatexample.ChatPresenter) Before(org.junit.Before)

Example 7 with ChatPresenter

use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.

the class ContactCacheTest 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();
}
Also used : ChatPresenter(com.example.chat.application.chatexample.ChatPresenter) RequestConnect(com.fanap.podchat.requestobject.RequestConnect) ChatListener(com.fanap.podchat.chat.ChatListener) Before(org.junit.Before)

Example 8 with ChatPresenter

use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.

the class AssistantCacheTest 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();
}
Also used : ChatPresenter(com.example.chat.application.chatexample.ChatPresenter) RequestConnect(com.fanap.podchat.requestobject.RequestConnect) ChatListener(com.fanap.podchat.chat.ChatListener) Before(org.junit.Before)

Example 9 with ChatPresenter

use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.

the class ChatTest 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();
}
Also used : ChatPresenter(com.example.chat.application.chatexample.ChatPresenter) RequestConnect(com.fanap.podchat.requestobject.RequestConnect) ChatListener(com.fanap.podchat.chat.ChatListener) Before(org.junit.Before)

Example 10 with ChatPresenter

use of com.example.chat.application.chatexample.ChatPresenter in project pod-chat-android-sdk by FanapSoft.

the class ChatTestIntegration method setUp.

@Before
public void setUp() {
    // Looper.prepare();
    // appContext = InstrumentationRegistry.getTargetContext();
    // MockitoAnnotations.initMocks(this);
    chatActivity = chatActivityRule.getActivity();
    presenter = new ChatPresenter(appContext, view, chatActivity);
// RequestConnect rc = new RequestConnect.Builder(
// socketAddress,
// APP_ID,
// serverName,
// "f29512343de1472fa15d1e497e264c54",
// ssoHost,
// platformHost,
// fileServer,
// "podSpaceServer")
// .build();
// presenter.connect(rc);
}
Also used : ChatPresenter(com.example.chat.application.chatexample.ChatPresenter) Before(org.junit.Before)

Aggregations

ChatPresenter (com.example.chat.application.chatexample.ChatPresenter)14 Before (org.junit.Before)14 ChatListener (com.fanap.podchat.chat.ChatListener)11 RequestConnect (com.fanap.podchat.requestobject.RequestConnect)11