Search in sources :

Example 1 with AndroidPayCapability

use of com.kickstarter.libs.AndroidPayCapability in project android-oss by kickstarter.

the class CheckoutViewModelTest method test_AndroidPayIsAvailable_WhenNotCapable.

@Test
public void test_AndroidPayIsAvailable_WhenNotCapable() {
    final Environment env = environment().toBuilder().androidPayCapability(new AndroidPayCapability(false)).build();
    final CheckoutViewModel vm = new CheckoutViewModel(env);
    vm.outputs.isAndroidPayAvailable().subscribe(Assert::assertFalse);
}
Also used : Assert(junit.framework.Assert) AndroidPayCapability(com.kickstarter.libs.AndroidPayCapability) Environment(com.kickstarter.libs.Environment) Test(org.junit.Test)

Example 2 with AndroidPayCapability

use of com.kickstarter.libs.AndroidPayCapability in project android-oss by kickstarter.

the class CheckoutViewModelTest method test_AndroidPayIsAvailable_WhenCapable.

@Test
public void test_AndroidPayIsAvailable_WhenCapable() {
    final Environment env = environment().toBuilder().androidPayCapability(new AndroidPayCapability(true)).build();
    final CheckoutViewModel vm = new CheckoutViewModel(env);
    vm.outputs.isAndroidPayAvailable().subscribe(Assert::assertTrue);
}
Also used : Assert(junit.framework.Assert) AndroidPayCapability(com.kickstarter.libs.AndroidPayCapability) Environment(com.kickstarter.libs.Environment) Test(org.junit.Test)

Aggregations

AndroidPayCapability (com.kickstarter.libs.AndroidPayCapability)2 Environment (com.kickstarter.libs.Environment)2 Assert (junit.framework.Assert)2 Test (org.junit.Test)2