use of com.kickstarter.services.apiresponses.ProjectStatsEnvelope in project android-oss by kickstarter.
the class CreatorDashboardReferrerBreakdownHolderViewModelTest method testReferrerPercents.
@Test
public void testReferrerPercents() {
final Project project = ProjectFactory.project();
final ProjectStatsEnvelope.ReferralAggregateStats referralAggregateStats = ProjectStatsEnvelopeFactory.ReferralAggregateStatsFactory.referralAggregates().toBuilder().custom(100).internal(50).external(50).build();
final ProjectStatsEnvelope.CumulativeStats cumulativeStats = ProjectStatsEnvelopeFactory.CumulativeStatsFactory.cumulativeStats().toBuilder().pledged(200).build();
final ProjectStatsEnvelope projectStatsEnvelope = ProjectStatsEnvelopeFactory.projectStatsEnvelope().toBuilder().referralAggregates(referralAggregateStats).cumulative(cumulativeStats).build();
setUpEnvironment(environment());
this.vm.inputs.projectAndStatsInput(Pair.create(project, projectStatsEnvelope));
this.customReferrerPercent.assertValues(.5f);
this.externalReferrerPercent.assertValues(.25f);
this.kickstarterReferrerPercent.assertValues(.25f);
}
Aggregations