mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 18:22:24 +08:00
test(wxapi): 适配新的模型测试
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.UnitTests
|
||||
{
|
||||
public class WechatApiExecuteCgibinQrcodeTests
|
||||
{
|
||||
[Fact(DisplayName = "[POST] /cgi-bin/qrcode/create")]
|
||||
public async Task CgibinQrcodeCreateTest()
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user