mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 23:13:32 +08:00
31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
using System.Threading.Tasks;
|
|
using Xunit;
|
|
|
|
namespace SKIT.FlurlHttpClient.Wechat.Api.UnitTests
|
|
{
|
|
public class TestCase_ApiExecuteCgibinQrcodeTests
|
|
{
|
|
[Fact(DisplayName = "测试用例:调用 API [POST] /cgi-bin/qrcode/create")]
|
|
public async Task TestExecuteCgibinQrcodeCreate()
|
|
{
|
|
var request = new Models.CgibinQrcodeCreateRequest()
|
|
{
|
|
AccessToken = TestConfigs.WechatAccessToken,
|
|
ExpiresIn = 30,
|
|
ActionType = "QR_STR_SCENE",
|
|
Action = new Models.CgibinQrcodeCreateRequest.Types.Action()
|
|
{
|
|
Scene = new Models.CgibinQrcodeCreateRequest.Types.Action.Types.Scene()
|
|
{
|
|
SceneString = "FAKE_SCENESTR"
|
|
}
|
|
}
|
|
};
|
|
var response = await TestClients.Instance.ExecuteCgibinQrcodeCreateAsync(request);
|
|
|
|
Assert.NotNull(response.Ticket);
|
|
Assert.NotNull(response.Url);
|
|
}
|
|
}
|
|
}
|