From 1dd04548869ffa90bf84d5dd0ae86a3edff1bc1d Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Sat, 28 Jul 2018 14:31:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84WxOpen=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=9A=84wxOpenAppId=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AdvancedAPIs/Template/TemplateApiTests.cs | 2 +- .../AdvancedAPIs/WxApp/WxAppApiTests.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/Template/TemplateApiTests.cs b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/Template/TemplateApiTests.cs index b9aa42854c..980af65fb7 100644 --- a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/Template/TemplateApiTests.cs +++ b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/Template/TemplateApiTests.cs @@ -88,7 +88,7 @@ public void SendTemplateMessageTest() "在线购买",DateTime.Now,"图书众筹","1234567890", 100, "400-9939-858","http://sdk.senparc.weixin.com"); - var result = TemplateApi.SendTemplateMessage(_appId, openId, data.TemplateId, data, "formSubmit", "pages/websocket", + var result = TemplateApi.SendTemplateMessage(_wxOpenAppId, openId, data.TemplateId, data, "formSubmit", "pages/websocket", "keyword3"); Assert.AreEqual(ReturnCode.请求成功,result.errcode); diff --git a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/WxApp/WxAppApiTests.cs b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/WxApp/WxAppApiTests.cs index 57be229019..0476b298d5 100644 --- a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/WxApp/WxAppApiTests.cs +++ b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/WxApp/WxAppApiTests.cs @@ -40,7 +40,7 @@ public void CreateWxaQrCodeTest() var dt1 = DateTime.Now; using (var ms = new MemoryStream()) { - var result = WxAppApi.CreateWxQrCode(base._appId, ms, "pages/websocket", 100); + var result = WxAppApi.CreateWxQrCode(base._wxOpenAppId, ms, "pages/websocket", 100); Assert.AreEqual(ReturnCode.请求成功, result.errcode); ms.Seek(0, SeekOrigin.Begin); @@ -65,7 +65,7 @@ public void CreateWxaQrCodeTest2() { var dt1 = DateTime.Now; var filePath = "../../Config/qr2.jpg"; - var result = WxAppApi.CreateWxQrCode(base._appId, filePath, "pages/websocket", 100); + var result = WxAppApi.CreateWxQrCode(base._wxOpenAppId, filePath, "pages/websocket", 100); var dt2 = DateTime.Now; Console.WriteLine("执行时间:{0}ms", (dt2 - dt1).TotalMilliseconds); } @@ -78,7 +78,7 @@ public void CreateWxaQrCodeAsyncTest() Task.Factory.StartNew(async () => { var ms = new MemoryStream(); - var result = await WxAppApi.CreateWxQrCodeAsync(base._appId, ms, "pages/websocket", 100); + var result = await WxAppApi.CreateWxQrCodeAsync(base._wxOpenAppId, ms, "pages/websocket", 100); Assert.AreEqual(ReturnCode.请求成功, result.errcode); ms.Seek(0, SeekOrigin.Begin); @@ -110,7 +110,7 @@ public void CreateWxaQrCodeAsyncTest2() var filePath = "../../Config/qr-async2.jpg"; Task.Factory.StartNew(async () => { - var result = await WxAppApi.CreateWxQrCodeAsync(base._appId, filePath, "pages/websocket", 100); + var result = await WxAppApi.CreateWxQrCodeAsync(base._wxOpenAppId, filePath, "pages/websocket", 100); Assert.AreEqual(ReturnCode.请求成功, result.errcode); Assert.IsTrue(File.Exists(filePath)); }); @@ -130,7 +130,7 @@ public void GetWxaCodeUnlimitTest() { var filePath = "../../Config/qr-unlimit.jpg"; var scene = ""; - var result = WxAppApi.GetWxaCodeUnlimit(base._appId,filePath, scene, "pages/websocket", 100); + var result = WxAppApi.GetWxaCodeUnlimit(base._wxOpenAppId,filePath, scene, "pages/websocket", 100); Assert.IsNotNull(result); Assert.AreEqual(ReturnCode.请求成功, result.errcode); }