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 { public MenuAddConditionalTest() { } protected override string GetReturnResult(bool errResult) { if (errResult) return s_errmsg; return @" { ""menuid"":""208379533"" }"; } protected override MenuAddConditionalRequest InitRequestObject() { return JsonConvert.DeserializeObject(@"{ ""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"" } }"); } } }