123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using JCSoft.WX.Framework.Models.ApiResponses;
- using System;
- using System.Collections.Generic;
- using System.Text;
- using JCSoft.WX.Framework.Models.ApiRequests;
- using Newtonsoft.Json;
- using FrameworkCoreTest;
- namespace JCSoft.WX.FrameworkTest.Api
- {
- public class MenuAddConditionalTest : MockPostApiBaseTest<MenuAddConditionalRequest,MenuAddConditionalResponse>
- {
- public MenuAddConditionalTest()
- {
- }
- protected override string GetReturnResult(bool errResult)
- {
- if (errResult) return s_errmsg;
- return @"
- {
- ""menuid"":""208379533""
- }";
- }
- protected override MenuAddConditionalRequest InitRequestObject()
- {
- return JsonConvert.DeserializeObject<MenuAddConditionalRequest>(@"{
- ""button"":[
- {
- ""type"":""click"",
- ""name"":""今日歌曲"",
- ""key"":""V1001_TODAY_MUSIC""
- },
- {
- ""name"":""菜单"",
- ""sub_button"":[
- {
- ""type"":""view"",
- ""name"":""搜索"",
- ""url"":""http://www.soso.com/""
- },
- {
- ""type"":""miniprogram"",
- ""name"":""wxa"",
- ""url"":""http://mp.weixin.qq.com"",
- ""appid"":""wx286b93c14bbf93aa"",
- ""pagepath"":""pages/lunar/index""
- },
- {
- ""type"":""click"",
- ""name"":""赞一下我们"",
- ""key"":""V1001_GOOD""
- }]
- }],
- ""matchrule"":{
- ""tag_id"":""2"",
- ""sex"":""1"",
- ""country"":""中国"",
- ""province"":""广东"",
- ""city"":""广州"",
- ""client_platform_type"":""2"",
- ""language"":""zh_CN""
- }
- }");
- }
- }
- }
|