use of com.waz.zclient.controllers.calling.ICallingController in project wire-android by wireapp.
the class ConversationFragmentTest method assertAudioCallInitatedInOneToOneConversation.
@Test
public void assertAudioCallInitatedInOneToOneConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.ONE_TO_ONE);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
ICallingController mockCallingController = activity.getControllerFactory().getCallingController();
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withId(R.id.action_audio_call)).check(isVisible());
onView(withId(R.id.action_audio_call)).perform(click());
verify(mockCallingController).startCall(false);
}
use of com.waz.zclient.controllers.calling.ICallingController in project wire-android by wireapp.
the class ConversationFragmentTest method assertVideoCallInitatedInOneToOneConversation.
@Test
public void assertVideoCallInitatedInOneToOneConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.ONE_TO_ONE);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
ICallingController mockCallingController = activity.getControllerFactory().getCallingController();
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withId(R.id.action_video_call)).check(isVisible());
onView(withId(R.id.action_video_call)).perform(click());
verify(mockCallingController).startCall(true);
}
use of com.waz.zclient.controllers.calling.ICallingController in project wire-android by wireapp.
the class ConversationFragmentTest method assertAudioCallInitatedInGroupConversation.
@Test
public void assertAudioCallInitatedInGroupConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.GROUP);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
ICallingController mockCallingController = activity.getControllerFactory().getCallingController();
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withId(R.id.action_audio_call)).check(isVisible());
onView(withId(R.id.action_audio_call)).perform(click());
verify(mockCallingController).startCall(false);
}
Aggregations