From 972f51c38dc5667b449de9244414fa13cccad56f Mon Sep 17 00:00:00 2001 From: Sammy Cannillo Date: Thu, 5 Dec 2024 14:38:19 -0600 Subject: [PATCH] Fixup - re-order mocks in tests for proper access to appLinkUri in VenmoClient --- .../braintreepayments/api/venmo/VenmoClientUnitTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Venmo/src/test/java/com/braintreepayments/api/venmo/VenmoClientUnitTest.java b/Venmo/src/test/java/com/braintreepayments/api/venmo/VenmoClientUnitTest.java index c821e3a7d0..70953cb4d5 100644 --- a/Venmo/src/test/java/com/braintreepayments/api/venmo/VenmoClientUnitTest.java +++ b/Venmo/src/test/java/com/braintreepayments/api/venmo/VenmoClientUnitTest.java @@ -326,7 +326,9 @@ public void createPaymentAuthRequest_whenAppLinkUriSet_appSwitchesWithAppLink() VenmoRequest request = new VenmoRequest(VenmoPaymentMethodUsage.SINGLE_USE); request.setProfileId(null); request.setShouldVault(false); - + + when(merchantRepository.getAppLinkReturnUri()).thenReturn(Uri.parse("https://example.com/payments")); + VenmoClient sut = new VenmoClient( braintreeClient, apiClient, @@ -338,8 +340,6 @@ public void createPaymentAuthRequest_whenAppLinkUriSet_appSwitchesWithAppLink() ); sut.createPaymentAuthRequest(context, request, venmoPaymentAuthRequestCallback); - when(merchantRepository.getAppLinkReturnUri()).thenReturn(Uri.parse("https://example.com/payments")); - ArgumentCaptor captor = ArgumentCaptor.forClass(VenmoPaymentAuthRequest.class); verify(venmoPaymentAuthRequestCallback).onVenmoPaymentAuthRequest(captor.capture());