use of com.kickstarter.mock.MockCurrentConfig in project android-oss by kickstarter.
the class FacebookConfimationViewModelTest method testToggleSendNewsLetter_isNotChecked.
@Test
public void testToggleSendNewsLetter_isNotChecked() {
final CurrentConfigType currentConfig = new MockCurrentConfig();
currentConfig.config(ConfigFactory.config().toBuilder().countryCode("US").build());
final Environment environment = environment().toBuilder().currentConfig(currentConfig).build();
this.vm = new FacebookConfirmationViewModel.ViewModel(environment);
this.vm.outputs.sendNewslettersIsChecked().subscribe(this.sendNewslettersIsChecked);
this.sendNewslettersIsChecked.assertValue(false);
this.vm.inputs.sendNewslettersClick(true);
this.vm.inputs.sendNewslettersClick(false);
this.sendNewslettersIsChecked.assertValues(false, true, false);
}
use of com.kickstarter.mock.MockCurrentConfig in project android-oss by kickstarter.
the class KSCurrencyTest method createKSCurrency.
private static KSCurrency createKSCurrency(final String countryCode) {
final Config config = ConfigFactory.config().toBuilder().countryCode(countryCode).build();
final CurrentConfigType currentConfig = new MockCurrentConfig();
currentConfig.config(config);
return new KSCurrency(currentConfig);
}
Aggregations