Skip to content

Commit

Permalink
Fixup - re-order mocks in tests for proper access to appLinkUri in Ve…
Browse files Browse the repository at this point in the history
…nmoClient
  • Loading branch information
scannillo committed Dec 5, 2024
1 parent d15b7db commit 972f51c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<VenmoPaymentAuthRequest> captor =
ArgumentCaptor.forClass(VenmoPaymentAuthRequest.class);
verify(venmoPaymentAuthRequestCallback).onVenmoPaymentAuthRequest(captor.capture());
Expand Down

0 comments on commit 972f51c

Please sign in to comment.