use of com.kickstarter.models.MessageThread in project android-oss by kickstarter.
the class MessagesViewModelTest method testConfiguredWithThread.
@Test
public void testConfiguredWithThread() {
final MessageThread messageThread = MessageThreadFactory.messageThread();
setUpEnvironment(environment().toBuilder().currentUser(new MockCurrentUser(UserFactory.user())).build());
// Start the view model with a message thread.
this.vm.intent(messagesContextIntent(messageThread));
this.backingAndProject.assertValueCount(1);
this.messageList.assertValueCount(1);
}
use of com.kickstarter.models.MessageThread in project android-oss by kickstarter.
the class MessageThreadHolderViewModelTest method testEmitsParticipantData.
@Test
public void testEmitsParticipantData() {
final MessageThread messageThread = MessageThreadFactory.messageThread();
setUpEnvironment(environment());
// Configure the view model with a message thread.
this.vm.inputs.configureWith(messageThread);
// Emits participant's avatar url and name.
this.participantAvatarUrl.assertValues(messageThread.participant().avatar().medium());
this.participantNameTextViewText.assertValues(messageThread.participant().name());
}
use of com.kickstarter.models.MessageThread in project android-oss by kickstarter.
the class MessageThreadHolderViewModelTest method testStartMessagesActivity.
@Test
public void testStartMessagesActivity() {
final MessageThread messageThread = MessageThreadFactory.messageThread();
setUpEnvironment(environment());
// Configure the view model with a message thread.
this.vm.inputs.configureWith(messageThread);
this.vm.inputs.messageThreadCardViewClicked();
this.startMessagesActivity.assertValues(messageThread);
}
use of com.kickstarter.models.MessageThread in project android-oss by kickstarter.
the class MessageThreadHolderViewModelTest method testEmitsDateTime.
@Test
public void testEmitsDateTime() {
final MessageThread messageThread = MessageThreadFactory.messageThread();
setUpEnvironment(environment());
// Configure the view model with a message thread.
this.vm.inputs.configureWith(messageThread);
this.dateDateTime.assertValues(messageThread.lastMessage().createdAt());
}
use of com.kickstarter.models.MessageThread in project android-oss by kickstarter.
the class MessageThreadHolderViewModelTest method testEmitsMessageBodyTextViewText.
@Test
public void testEmitsMessageBodyTextViewText() {
final MessageThread messageThread = MessageThreadFactory.messageThread();
setUpEnvironment(environment());
// Configure the view model with a message thread.
this.vm.inputs.configureWith(messageThread);
this.messageBodyTextViewText.assertValues(messageThread.lastMessage().body());
}
Aggregations