1
0
mirror of synced 2025-12-23 18:48:00 +08:00

#503 微信支付增加资金账单下载接口

This commit is contained in:
鱼丸Cwivan
2018-09-05 00:11:13 +08:00
committed by Binary Wang
parent 95e398de7e
commit cc6dd65671
7 changed files with 433 additions and 39 deletions

View File

@@ -11,6 +11,7 @@ import com.github.binarywang.wxpay.bean.result.*;
import com.github.binarywang.wxpay.constant.WxPayConstants.BillType;
import com.github.binarywang.wxpay.constant.WxPayConstants.SignType;
import com.github.binarywang.wxpay.constant.WxPayConstants.TradeType;
import com.github.binarywang.wxpay.constant.WxPayConstants.AccountType;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.github.binarywang.wxpay.testbase.ApiTestModule;
@@ -165,6 +166,31 @@ public class BaseWxPayServiceImplTest {
this.payService.downloadBill("", "", "", null);
}
@DataProvider
public Object[][] fundFlowData() {
return new Object[][]{
{"20180819", AccountType.BASIC, TarType.GZIP},
{"20180819", AccountType.OPERATION, TarType.GZIP},
{"20180819", AccountType.FEES, TarType.GZIP},
{"20180819", AccountType.BASIC, null},
{"20180819", AccountType.OPERATION, null},
{"20180819", AccountType.FEES, null}
};
}
@Test(dataProvider = "fundFlowData")
public void testDownloadFundFlow(String billDate, String accountType, String tarType) throws Exception {
WxPayFundFlowResult fundFlowResult = this.payService.downloadFundFlow(billDate, accountType, tarType);
assertThat(fundFlowResult).isNotNull();
this.logger.info(fundFlowResult.toString());
}
@Test(expectedExceptions = WxPayException.class)
public void testDownloadFundFlow_withNoParams() throws Exception {
//必填字段为空时,抛出异常
this.payService.downloadFundFlow("", "", null);
}
@Test
public void testReport() throws Exception {
WxPayReportRequest request = new WxPayReportRequest();