🎨 #2476【公众号】客服消息增加草稿箱图文消息类型

This commit is contained in:
JCLee
2021-12-31 15:04:07 +08:00
committed by GitHub
parent a647fe8c5b
commit fd8e02a81a
5 changed files with 61 additions and 0 deletions

View File

@ -166,4 +166,13 @@ public class WxMpKefuMessageTest {
"{\"touser\":\"OPENID\",\"msgtype\":\"msgmenu\",\"msgmenu\":{\"head_content\":\"head_content\",\"list\":[{\"id\":\"101\",\"content\":\"msgmenu1\"},{\"id\":\"102\",\"content\":\"msgmenu2\"}],\"tail_content\":\"tail_content\"}}");
}
public void testMpNewsArticleBuilder() {
WxMpKefuMessage reply = WxMpKefuMessage.MPNEWSARTICLE()
.toUser("OPENID")
.articleId("ARTICLE_ID")
.build();
Assert.assertEquals(reply.toJson(),
"{\"touser\":\"OPENID\",\"msgtype\":\"mpnewsarticle\",\"mpnewsarticle\":{\"article_id\":\"ARTICLE_ID\"}}");
}
}