本文整理匯總了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,"}
};
}