Skip to content

Commit

Permalink
Fix broken unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
sshropshire committed Jul 24, 2024
1 parent 00c25bf commit 469c819
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public BraintreeClient build() {
callback.onResult(null, sendGraphQLPOSTError);
}
return null;
}).when(braintreeClient).sendGraphQLPOST(anyString(), any(HttpResponseCallback.class));
}).when(braintreeClient).sendGraphQLPOST(any(), any(HttpResponseCallback.class));

return braintreeClient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public void deletePaymentMethodNonce_withTokenizationKey_throwsAnError() {
assertEquals("A client token with a customer id must be used to delete a payment method nonce.",
captor.getValue().getMessage());

verify(braintreeClient, never()).sendGraphQLPOST(anyString(), any(HttpResponseCallback.class));
verify(braintreeClient, never()).sendGraphQLPOST(any(), any(HttpResponseCallback.class));
}

@Test
Expand Down Expand Up @@ -374,10 +374,10 @@ public void deletePaymentMethodNonce_postToGraphQL()

verify(braintreeClient).getIntegrationType();

ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
ArgumentCaptor<JSONObject> captor = ArgumentCaptor.forClass(JSONObject.class);
verify(braintreeClient).sendGraphQLPOST(captor.capture(), any(HttpResponseCallback.class));

JSONObject graphQlRequest = new JSONObject(captor.getValue());
JSONObject graphQlRequest = captor.getValue();

String expectedGraphQLQuery = GraphQLQueryHelper.getQuery(
ApplicationProvider.getApplicationContext(), R.raw.delete_payment_method_mutation);
Expand Down

0 comments on commit 469c819

Please sign in to comment.