Skip to content

Commit b3a53a1

Browse files
删除无用代码,相关方法并不会抛出异常
1 parent 067dbe8 commit b3a53a1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class AutoUpdateVerifierTest {
4343
private AutoUpdateCertificatesVerifier verifier;
4444

4545
@Before
46-
public void setup() throws IOException {
46+
public void setup() {
4747
PrivateKey merchantPrivateKey = PemUtil.loadPrivateKey(privateKey);
4848

4949
//使用自动更新的签名验证器,不需要传入证书
@@ -63,7 +63,7 @@ public void after() throws IOException {
6363
}
6464

6565
@Test
66-
public void autoUpdateVerifierTest() throws Exception {
66+
public void autoUpdateVerifierTest() {
6767
assertTrue(verifier.verify(serialNumber, message.getBytes(StandardCharsets.UTF_8), signature));
6868
}
6969

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class HttpClientBuilderTest {
4646
private CloseableHttpClient httpClient;
4747

4848
@Before
49-
public void setup() throws IOException {
49+
public void setup() {
5050
PrivateKey merchantPrivateKey = PemUtil.loadPrivateKey(privateKey);
5151
X509Certificate wechatPayCertificate = PemUtil.loadCertificate(
5252
new ByteArrayInputStream(certificate.getBytes(StandardCharsets.UTF_8)));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class RsaCryptoTest {
3535
private AutoUpdateCertificatesVerifier verifier;
3636

3737
@Before
38-
public void setup() throws IOException {
38+
public void setup() {
3939
PrivateKey merchantPrivateKey = PemUtil.loadPrivateKey(privateKey);
4040

4141
//使用自动更新的签名验证器,不需要传入证书

0 commit comments

Comments
 (0)