use of com.braintreepayments.testutils.TestConfigurationBuilder.TestPayPalConfigurationBuilder in project braintree_android by braintree.
the class PayPalUnitTest method setup.
@Before
public void setup() throws Exception {
spy(PayPal.class);
doReturn(true).when(PayPal.class, "isManifestValid", any(Context.class));
spy(Recipe.class);
doReturn(true).when(Recipe.class, "isValidBrowserTarget", any(Context.class), anyString(), anyString());
Authorization authorization = mock(Authorization.class);
when(authorization.getBearer()).thenReturn("authorization");
when(authorization.toString()).thenReturn("authorization");
Configuration configuration = new TestConfigurationBuilder().withAnalytics().paypal(new TestPayPalConfigurationBuilder(true).environment("offline").billingAgreementsEnabled(false)).buildConfiguration();
mMockFragmentBuilder = new MockFragmentBuilder().authorization(authorization).configuration(configuration);
}
Aggregations