2022-01-21 14:30:17 +08:00
|
|
|
|
using System.Threading.Tasks;
|
2021-11-26 01:44:30 +08:00
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
|
|
|
|
|
{
|
2022-01-21 13:10:56 +08:00
|
|
|
|
public class TestCase_ApiExecuteExecuteProfitSharingTests
|
2021-11-26 01:44:30 +08:00
|
|
|
|
{
|
2022-01-21 13:10:56 +08:00
|
|
|
|
[Fact(DisplayName = "测试用例:调用 API [POST] /profitsharing/receivers/add")]
|
|
|
|
|
public async Task TestExecuteAddProfitSharingReceiver()
|
2021-11-26 01:44:30 +08:00
|
|
|
|
{
|
2021-11-26 02:40:40 +08:00
|
|
|
|
await TestClients.InitializeCertificateManagerAsync();
|
2021-11-26 01:44:30 +08:00
|
|
|
|
|
|
|
|
|
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());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|