mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-17 19:37:35 +08:00
test(tenpayv3): 补充添加分账接收方接口的测试用例
This commit is contained in:
parent
a006582c49
commit
d0d1d6ceb5
@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
|
||||||
|
{
|
||||||
|
public class WechatTenpayExecuteProfitSharingTests
|
||||||
|
{
|
||||||
|
[Fact(DisplayName = "[POST] /profitsharing/receivers/add")]
|
||||||
|
public async Task AddProfitSharingReceiverTest()
|
||||||
|
{
|
||||||
|
var cert = TestClients.Instance.DecryptResponseSensitiveProperty(await TestClients.Instance.ExecuteQueryCertificatesAsync(new Models.QueryCertificatesRequest()));
|
||||||
|
foreach (var certificateModel in cert.CertificateList)
|
||||||
|
{
|
||||||
|
TestClients.GlobalCertificateManager.AddEntry(new Settings.CertificateEntry(certificateModel));
|
||||||
|
}
|
||||||
|
|
||||||
|
var request = new Models.AddProfitSharingReceiverRequest()
|
||||||
|
{
|
||||||
|
AppId = TestConfigs.WechatAppId,
|
||||||
|
Account = TestConfigs.WechatOpenId,
|
||||||
|
RelationType = "DISTRIBUTOR",
|
||||||
|
Name = "NAME",
|
||||||
|
Type = "PERSONAL_OPENID"
|
||||||
|
};
|
||||||
|
TestClients.Instance.EncryptRequestSensitiveProperty(request);
|
||||||
|
var response = await TestClients.Instance.ExecuteAddProfitSharingReceiverAsync(request);
|
||||||
|
|
||||||
|
Assert.True(response.IsSuccessful());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user