public async Task Test_GenerateLimitQRCodeStr() { IWeChatQRCodeService weChatQRCodeService = _sp.GetService<IWeChatQRCodeService>(); var request = new CreateLimitQRStrCodeRequest(); request.SetScene("1"); var result = await weChatQRCodeService.GenerateLimitQRCode(await GetAccessToken(), request); Assert.IsNotNull(result); Assert.IsFalse(string.IsNullOrEmpty(result.ticket)); }
public async Task Test_GetWXAcodeUnlimit() { IWeChatQRCodeService weChatQRCodeService = _sp.GetService<IWeChatQRCodeService>(); var request = new GetWXAcodeUnlimitRequest(); request.Scene = "520"; request.Auto_color = true; request.Is_hyaline = true; var result = await weChatQRCodeService.GetWXAcodeUnlimit(await GetAccessToken(), request); Assert.IsNotNull(result); Assert.IsTrue(result.ErrCode == 0); }