use of com.kickstarter.models.SurveyResponse in project android-oss by kickstarter.
the class ActivityFeedAdapterTest method loggedInWithActivitiesAndErroredBackingsAndSurveys.
@Test
public void loggedInWithActivitiesAndErroredBackingsAndSurveys() {
final Activity activity0 = ActivityFactory.projectStateChangedPositiveActivity();
final Activity activity1 = ActivityFactory.friendBackingActivity();
final Activity activity2 = ActivityFactory.projectStateChangedActivity();
final ErroredBacking erroredBacking = ErroredBackingFactory.Companion.erroredBacking();
final SurveyResponse surveyResponse0 = SurveyResponseFactory.surveyResponse();
final SurveyResponse surveyResponse1 = SurveyResponseFactory.surveyResponse();
this.adapter.takeActivities(Arrays.asList(activity0, activity1, activity2));
this.adapter.takeErroredBackings(Collections.singletonList(erroredBacking));
this.adapter.takeSurveys(Arrays.asList(surveyResponse0, surveyResponse1));
this.adapter.showLoggedInEmptyState(true);
final List<List<Object>> data = Arrays.asList(Collections.singletonList(true), Collections.emptyList(), Collections.singletonList(1), Collections.singletonList(erroredBacking), Collections.singletonList(2), Arrays.asList(surveyResponse0, surveyResponse1), Arrays.asList(activity0, activity1, activity2));
Assert.assertEquals(data, this.adapter.sections());
}
use of com.kickstarter.models.SurveyResponse in project android-oss by kickstarter.
the class SurveyHolderViewModelTest method testSurveyDescription.
@Test
public void testSurveyDescription() {
final SurveyResponse surveyResponse = SurveyResponseFactory.surveyResponse();
setUpEnvironment(environment());
this.vm.inputs.configureWith(surveyResponse);
this.projectForSurveyDescription.assertValues(surveyResponse.project());
}
use of com.kickstarter.models.SurveyResponse in project android-oss by kickstarter.
the class SurveyHolderViewModelTest method testStartSurveyResponseActivity.
@Test
public void testStartSurveyResponseActivity() {
final SurveyResponse surveyResponse = SurveyResponseFactory.surveyResponse();
setUpEnvironment(environment());
this.vm.inputs.configureWith(surveyResponse);
this.vm.inputs.surveyClicked();
this.startSurveyResponseActivity.assertValue(surveyResponse);
}
use of com.kickstarter.models.SurveyResponse in project android-oss by kickstarter.
the class SurveyHolderViewModelTest method testCreatorAvatarImageUrl.
@Test
public void testCreatorAvatarImageUrl() {
final SurveyResponse surveyResponse = SurveyResponseFactory.surveyResponse();
setUpEnvironment(environment());
this.vm.inputs.configureWith(surveyResponse);
this.creatorAvatarImageUrl.assertValues(surveyResponse.project().creator().avatar().small());
}
Aggregations