Skip to content

Commit 67f1f02

Browse files
常量可读性优化
1 parent 483aa08 commit 67f1f02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/com/wechat/pay/contrib/apache/httpclient/AutoUpdateVerifierTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.wechat.pay.contrib.apache.httpclient;
22

3+
import static org.apache.http.HttpHeaders.ACCEPT;
34
import static org.apache.http.HttpStatus.SC_OK;
5+
import static org.apache.http.entity.ContentType.APPLICATION_JSON;
46
import static org.junit.Assert.assertEquals;
57
import static org.junit.Assert.assertTrue;
68

@@ -71,7 +73,7 @@ public void autoUpdateVerifierTest() {
7173
public void getCertificateTest() throws Exception {
7274
URIBuilder uriBuilder = new URIBuilder("https://api.mch.weixin.qq.com/v3/certificates");
7375
HttpGet httpGet = new HttpGet(uriBuilder.build());
74-
httpGet.addHeader("Accept", "application/json");
76+
httpGet.addHeader(ACCEPT, APPLICATION_JSON.getMimeType());
7577
CloseableHttpResponse response = httpClient.execute(httpGet);
7678
assertEquals(SC_OK, response.getStatusLine().getStatusCode());
7779
try {

0 commit comments

Comments
 (0)