mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 18:48:10 +08:00
test(tenpayv2): 补充发起退款接口的单元测试用例
This commit is contained in:
@@ -7,7 +7,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests
|
||||
public class TestCase_ApiExecuteExecutePayTransactionsTests
|
||||
{
|
||||
[Fact(DisplayName = "测试用例:调用 API [POST] /pay/micropay")]
|
||||
public async Task TestCase_ApiExecuteExecutePayTests()
|
||||
public async Task TestCase_ApiExecuteExecuteCreatePayMicroPayTests()
|
||||
{
|
||||
var request = new Models.CreatePayMicroPayRequest()
|
||||
{
|
||||
@@ -23,5 +23,23 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests
|
||||
Assert.NotNull(response.ReturnMessage);
|
||||
Assert.NotNull(response.TransactionId);
|
||||
}
|
||||
|
||||
[Fact(DisplayName = "测试用例:调用 API [POST] /secapi/pay/refund")]
|
||||
public async Task TestCase_ApiExecuteCreatePayRefundTests()
|
||||
{
|
||||
var request = new Models.CreatePayRefundRequest()
|
||||
{
|
||||
OutTradeNumber = "TSET_OUTTRADENO",
|
||||
OutRefundNumber = "TEST_OTN_" + DateTimeOffset.Now.ToString("yyyyMMddHHmmssfff"),
|
||||
TotalFee = 1,
|
||||
RefundFee = 1,
|
||||
Description = "TEST_DESC"
|
||||
};
|
||||
var response = await TestClients.Instance.ExecuteCreatePayRefundAsync(request);
|
||||
|
||||
Assert.NotNull(response.ReturnCode);
|
||||
Assert.NotNull(response.ReturnMessage);
|
||||
Assert.NotNull(response.RefundId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user