2021-11-26 01:44:30 +08:00
|
|
|
|
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()
|
|
|
|
|
{
|
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());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|