use of com.kickstarter.services.apiresponses.InternalBuildEnvelope in project android-oss by kickstarter.
the class DiscoveryViewModelTest method testBuildCheck.
@Test
public void testBuildCheck() {
final DiscoveryViewModel vm = new DiscoveryViewModel(environment());
final InternalBuildEnvelope buildEnvelope = InternalBuildEnvelopeFactory.newerBuildAvailable();
final TestSubscriber<InternalBuildEnvelope> showBuildCheckAlert = new TestSubscriber<>();
vm.outputs.showBuildCheckAlert().subscribe(showBuildCheckAlert);
// Build check should not be shown.
showBuildCheckAlert.assertNoValues();
// Build check should be shown when newer build is available.
vm.inputs.newerBuildIsAvailable(buildEnvelope);
showBuildCheckAlert.assertValue(buildEnvelope);
}
Aggregations