Skip to content

Commit

Permalink
test: fix no assertion to a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
xy-peng committed Feb 7, 2023
1 parent 16823e7 commit 4d8ba10
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.wechat.pay.java.core.model.TestConfig.MERCHANT_CERTIFICATE_SERIAL_NUMBER;
import static com.wechat.pay.java.core.model.TestConfig.MERCHANT_PRIVATE_KEY;
import static java.net.HttpURLConnection.HTTP_OK;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import com.wechat.pay.java.core.auth.Validator;
Expand Down Expand Up @@ -105,15 +106,22 @@ public void testCreateWithHttpClientBuilder() {
Builder provider =
new Builder()
.privateKey(MERCHANT_PRIVATE_KEY)
.merchantSerialNumber(MERCHANT_CERTIFICATE_SERIAL_NUMBER)
.merchantId("5123456-0-1")
.apiV3Key(API_V3_KEY.getBytes(StandardCharsets.UTF_8));

DefaultHttpClientBuilder builder =
new DefaultHttpClientBuilder()
.okHttpClient(createOkHttpClient())
.connectTimeoutMs(1000)
.readTimeoutMs(1000)
.writeTimeoutMs(1000);
provider.httpClientBuilder(builder);

assertDoesNotThrow(() -> {
provider.httpClientBuilder(builder);
provider.build();
});

}

@ParameterizedTest
Expand Down

0 comments on commit 4d8ba10

Please sign in to comment.