use of com.kickstarter.models.Message in project android-oss by kickstarter.
the class MessageHolderViewModelTest method testParticipantAvatarImage_CurrentUserIsSender.
@Test
public void testParticipantAvatarImage_CurrentUserIsSender() {
final User recipient = UserFactory.user().toBuilder().name("Ima Creator").id(123L).build();
final User sender = UserFactory.user().toBuilder().name("Ima Backer").id(456L).build();
final Message message = MessageFactory.message().toBuilder().recipient(recipient).sender(sender).build();
final MockCurrentUser currentUser = new MockCurrentUser(sender);
setUpEnvironment(environment().toBuilder().currentUser(currentUser).build());
this.vm.inputs.configureWith(message);
// Avatar hidden for sender who is the backer.
this.participantAvatarImageHidden.assertValues(true);
this.participantAvatarImageUrl.assertNoValues();
}
Aggregations