use of com.braintreepayments.testutils.TestConfigurationBuilder.TestAndroidPayConfigurationBuilder in project braintree_android by braintree.
the class AndroidPayTest method setup.
@Before
public void setup() {
mLatch = new CountDownLatch(1);
mBaseConfiguration = new TestConfigurationBuilder().androidPay(new TestAndroidPayConfigurationBuilder().googleAuthorizationFingerprint("google-auth-fingerprint")).merchantId("android-pay-merchant-id");
}
use of com.braintreepayments.testutils.TestConfigurationBuilder.TestAndroidPayConfigurationBuilder in project braintree_android by braintree.
the class AndroidPayTest method isReadyToPay_returnsFalseWhenAndroidPayIsNotEnabled.
@Test(timeout = 5000)
public void isReadyToPay_returnsFalseWhenAndroidPayIsNotEnabled() throws Exception {
String configuration = new TestConfigurationBuilder().androidPay(new TestAndroidPayConfigurationBuilder().enabled(false)).build();
BraintreeFragment fragment = getFragment(mActivityTestRule.getActivity(), TOKENIZATION_KEY, configuration);
AndroidPay.isReadyToPay(fragment, new BraintreeResponseListener<Boolean>() {
@Override
public void onResponse(Boolean isReadyToPay) {
assertFalse(isReadyToPay);
mLatch.countDown();
}
});
mLatch.await();
}
use of com.braintreepayments.testutils.TestConfigurationBuilder.TestAndroidPayConfigurationBuilder in project braintree_android by braintree.
the class GooglePaymentTest method isReadyToPay_returnsFalseWhenAndroidPayIsNotEnabled.
@Test(timeout = 5000)
public void isReadyToPay_returnsFalseWhenAndroidPayIsNotEnabled() throws Exception {
String configuration = new TestConfigurationBuilder().androidPay(new TestAndroidPayConfigurationBuilder().enabled(false)).build();
BraintreeFragment fragment = getFragment(mActivityTestRule.getActivity(), TOKENIZATION_KEY, configuration);
GooglePayment.isReadyToPay(fragment, new BraintreeResponseListener<Boolean>() {
@Override
public void onResponse(Boolean isReadyToPay) {
assertFalse(isReadyToPay);
mLatch.countDown();
}
});
mLatch.await();
}
use of com.braintreepayments.testutils.TestConfigurationBuilder.TestAndroidPayConfigurationBuilder in project braintree_android by braintree.
the class GooglePaymentTest method setup.
@Before
public void setup() {
mLatch = new CountDownLatch(1);
mBaseConfiguration = new TestConfigurationBuilder().androidPay(new TestAndroidPayConfigurationBuilder().googleAuthorizationFingerprint("google-auth-fingerprint")).merchantId("android-pay-merchant-id");
}
Aggregations