use of com.paypal.android.sdk.onetouch.core.BillingAgreementRequest in project braintree_android by braintree.
the class PayPalRequestUnitTest method getBillingAgreement_containsCorrectValues.
@Test
public void getBillingAgreement_containsCorrectValues() throws JSONException {
Configuration configuration = Configuration.fromJson(stringFromFixture("configuration/with_offline_paypal.json"));
BraintreeFragment fragment = mMockFragmentBuilder.configuration(configuration).build();
BillingAgreementRequest request = PayPal.getBillingAgreementRequest(fragment, "https://paypal.com/?ba_token=pairingId");
assertEquals(EnvironmentManager.MOCK, request.getEnvironment());
assertEquals("com.braintreepayments.api.braintree://onetouch/v1/cancel", request.getCancelUrl());
assertEquals("com.braintreepayments.api.braintree://onetouch/v1/success", request.getSuccessUrl());
assertEquals("paypal_client_id", request.getClientId());
assertEquals("pairingId", request.getPairingId());
}
Aggregations