use of com.braintreepayments.api.internal.HttpClient in project braintree_android by braintree.
the class BraintreeFragmentUnitTest method getBraintreeApiHttpClient_returnsExistingClientIfOneExists.
@Test
public void getBraintreeApiHttpClient_returnsExistingClientIfOneExists() throws Exception {
String configuration = new TestConfigurationBuilder().braintreeApi(new TestBraintreeApiConfigurationBuilder().accessToken("some-token").url("http://braintree-api.com")).build();
mockConfigurationManager(Configuration.fromJson(configuration));
BraintreeFragment fragment = BraintreeFragment.newInstance(mActivity, TOKENIZATION_KEY);
HttpClient client = fragment.getBraintreeApiHttpClient();
HttpClient client2 = fragment.getBraintreeApiHttpClient();
assertSame(client, client2);
}
Aggregations