本文整理汇总了Java中me.chanjar.weixin.mp.bean.message.WxMpXmlMessage.setFormat方法的典型用法代码示例。如果您正苦于以下问题:Java WxMpXmlMessage.setFormat方法的具体用法?Java WxMpXmlMessage.setFormat怎么用?Java WxMpXmlMessage.setFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类me.chanjar.weixin.mp.bean.message.WxMpXmlMessage
的用法示例。
在下文中一共展示了WxMpXmlMessage.setFormat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: messages2
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; //导入方法依赖的package包/类
@DataProvider(name = "messages-1")
public Object[][] messages2() {
WxMpXmlMessage message1 = new WxMpXmlMessage();
message1.setMsgType(WxConsts.XML_MSG_TEXT);
WxMpXmlMessage message2 = new WxMpXmlMessage();
message2.setEvent(WxConsts.EVT_CLICK);
WxMpXmlMessage message3 = new WxMpXmlMessage();
message3.setEventKey("KEY_1");
WxMpXmlMessage message4 = new WxMpXmlMessage();
message4.setContent("CONTENT_1");
WxMpXmlMessage message5 = new WxMpXmlMessage();
message5.setContent("BLA");
WxMpXmlMessage message6 = new WxMpXmlMessage();
message6.setContent("abcd");
WxMpXmlMessage message7 = new WxMpXmlMessage();
message7.setFormat("strangeformat");
WxMpXmlMessage c2 = new WxMpXmlMessage();
c2.setMsgType(WxConsts.XML_MSG_TEXT);
c2.setEvent(WxConsts.EVT_CLICK);
WxMpXmlMessage c3 = new WxMpXmlMessage();
c3.setMsgType(WxConsts.XML_MSG_TEXT);
c3.setEvent(WxConsts.EVT_CLICK);
c3.setEventKey("KEY_1");
WxMpXmlMessage c4 = new WxMpXmlMessage();
c4.setMsgType(WxConsts.XML_MSG_TEXT);
c4.setEvent(WxConsts.EVT_CLICK);
c4.setEventKey("KEY_1");
c4.setContent("CONTENT_1");
return new Object[][]{
new Object[]{message1, WxConsts.XML_MSG_TEXT + ","},
new Object[]{message2, WxConsts.EVT_CLICK + ","},
new Object[]{message3, "KEY_1,"},
new Object[]{message4, "CONTENT_1,"},
new Object[]{message5, "ALL,"},
new Object[]{message6, "abcd,"},
new Object[]{message7, "matcher,"},
new Object[]{c2, "COMBINE_2,"},
new Object[]{c3, "COMBINE_3,"},
new Object[]{c4, "COMBINE_4,"}
};
}
示例2: messages2
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; //导入方法依赖的package包/类
@DataProvider(name = "messages-1")
public Object[][] messages2() {
WxMpXmlMessage message1 = new WxMpXmlMessage();
message1.setMsgType(WxConsts.XmlMsgType.TEXT);
WxMpXmlMessage message2 = new WxMpXmlMessage();
message2.setEvent(WxConsts.EventType.CLICK);
WxMpXmlMessage message3 = new WxMpXmlMessage();
message3.setEventKey("KEY_1");
WxMpXmlMessage message4 = new WxMpXmlMessage();
message4.setContent("CONTENT_1");
WxMpXmlMessage message5 = new WxMpXmlMessage();
message5.setContent("BLA");
WxMpXmlMessage message6 = new WxMpXmlMessage();
message6.setContent("abcd");
WxMpXmlMessage message7 = new WxMpXmlMessage();
message7.setFormat("strangeformat");
WxMpXmlMessage c2 = new WxMpXmlMessage();
c2.setMsgType(WxConsts.XmlMsgType.TEXT);
c2.setEvent(WxConsts.EventType.CLICK);
WxMpXmlMessage c3 = new WxMpXmlMessage();
c3.setMsgType(WxConsts.XmlMsgType.TEXT);
c3.setEvent(WxConsts.EventType.CLICK);
c3.setEventKey("KEY_1");
WxMpXmlMessage c4 = new WxMpXmlMessage();
c4.setMsgType(WxConsts.XmlMsgType.TEXT);
c4.setEvent(WxConsts.EventType.CLICK);
c4.setEventKey("KEY_1");
c4.setContent("CONTENT_1");
return new Object[][]{
new Object[]{message1, WxConsts.XmlMsgType.TEXT + ","},
new Object[]{message2, WxConsts.EventType.CLICK + ","},
new Object[]{message3, "KEY_1,"},
new Object[]{message4, "CONTENT_1,"},
new Object[]{message5, "ALL,"},
new Object[]{message6, "abcd,"},
new Object[]{message7, "matcher,"},
new Object[]{c2, "COMBINE_2,"},
new Object[]{c3, "COMBINE_3,"},
new Object[]{c4, "COMBINE_4,"}
};
}