Skip to content

Commit eb5c2c4

Browse files
committed
Renamed the helper in ClientTest to stubGuidAndAccessToken
1 parent f346bdb commit eb5c2c4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/test/java/com/bitpay/sdk/ClientTest.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ public void it_should_create_refund() throws BitPayApiException, BitPayGenericEx
663663
Mockito.when(this.bitPayClient.post("refunds/", createRefundJsonRequest, true))
664664
.thenReturn(
665665
this.getHttpResponseWithSpecificBody(getPreparedJsonDataFromFile("createRefundResponse.json")));
666-
setupTokenContainerGetAccessTokenAndExecuteStubs(Facade.MERCHANT, merchantToken);
666+
this.stubGuidAndAccessToken(Facade.MERCHANT, merchantToken);
667667
Client testedClass = this.getTestedClass();
668668

669669
// when
@@ -1555,7 +1555,7 @@ public void it_should_test_updatePayoutRecipient() throws BitPayApiException, Bi
15551555
payoutRecipient.setLabel(label);
15561556
payoutRecipient.setToken(PAYOUT_ACCESS_TOKEN);
15571557

1558-
setupTokenContainerGetAccessTokenAndExecuteStubs(Facade.PAYOUT, PAYOUT_ACCESS_TOKEN);
1558+
this.stubGuidAndAccessToken(Facade.PAYOUT, PAYOUT_ACCESS_TOKEN);
15591559
Mockito.when(this.bitPayClient.update(
15601560
"recipients/" + RECIPIENT_ID,
15611561
getPreparedJsonDataFromFile("updatePayoutRecipientRequest.json")
@@ -2103,11 +2103,11 @@ private Client getTestedClass() {
21032103
);
21042104
}
21052105

2106-
private void setupTokenContainerGetAccessTokenAndExecuteStubs(
2107-
Facade getAccessTokenArg1,
2108-
String getAccessTokenReturnValue
2106+
private void stubGuidAndAccessToken(
2107+
Facade facade,
2108+
String accessToken
21092109
) throws BitPayGenericException {
21102110
Mockito.when(this.guidGenerator.execute()).thenReturn(EXAMPLE_UUID);
2111-
Mockito.when(this.accessTokens.getAccessToken(getAccessTokenArg1)).thenReturn(getAccessTokenReturnValue);
2111+
Mockito.when(this.accessTokens.getAccessToken(facade)).thenReturn(accessToken);
21122112
}
21132113
}

0 commit comments

Comments
 (0)