use of com.kickstarter.services.apiresponses.ProjectsEnvelope in project android-oss by kickstarter.
the class CreatorDashboardViewModelTest method testProjectName_whenSingleProject.
@Test
public void testProjectName_whenSingleProject() {
final Project project = ProjectFactory.project().toBuilder().name("Best Project 2K19").build();
final MockApiClient apiClient = new MockApiClient() {
@Override
@NonNull
public Observable<ProjectsEnvelope> fetchProjects(final boolean member) {
return Observable.just(ProjectsEnvelopeFactory.projectsEnvelope(Collections.singletonList(project)));
}
};
setUpEnvironment(environment().toBuilder().apiClient(apiClient).build());
this.vm.intent(new Intent().putExtra(IntentKey.PROJECT, project));
this.projectName.assertValue("Best Project 2K19");
}
Aggregations