Skip to content

Commit

Permalink
update TestMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
JaneConan committed Dec 1, 2023
1 parent a494239 commit 503e2e0
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Senparc.Weixin.MP;
using Senparc.Weixin.MP.CommonAPIs;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -45,7 +46,23 @@ public void GetCurrentSelfMenuInfoTest()
{
Assert.IsTrue(true);
}
Assert.IsTrue(false);
else
{
Assert.IsTrue(false);
}

string json = "{\"is_menu_open\":1,\"selfmenu_info\":{\"button\":[{\"type\":\"click\",\"name\":\"今日歌曲\",\"key\":\"V1001_TODAY_MUSIC\"},{\"name\":\"菜单\",\"sub_button\":{\"list\":[{\"type\":\"view\",\"name\":\"搜索\",\"url\":\"http:\\/\\/www.soso.com\\/\"},{\"type\":\"click\",\"name\":\"赞一下我们\",\"key\":\"V1001_GOOD\"}]}}]}}";
try
{
var test = Newtonsoft.Json.JsonConvert.DeserializeObject<SelfMenuConfigResult>(json);
Console.WriteLine(test);
Assert.IsTrue(true);
}
catch (Exception)
{
Assert.IsTrue(false);
throw;
}
}
}
}

0 comments on commit 503e2e0

Please sign in to comment.