Java Code Examples for me.chanjar.weixin.common.api.WxConsts#EVT_CLICK

The following examples show how to use me.chanjar.weixin.common.api.WxConsts#EVT_CLICK . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WxCpMessageRouterTest.java    From weixin-java-tools with Apache License 2.0 4 votes vote down vote up
@DataProvider(name="messages-1")
public Object[][] messages2() {
  WxCpXmlMessage message1 = new WxCpXmlMessage();
  message1.setMsgType(WxConsts.XML_MSG_TEXT);

  WxCpXmlMessage message2 = new WxCpXmlMessage();
  message2.setEvent(WxConsts.EVT_CLICK);
  
  WxCpXmlMessage message3 = new WxCpXmlMessage();
  message3.setEventKey("KEY_1");
  
  WxCpXmlMessage message4 = new WxCpXmlMessage();
  message4.setContent("CONTENT_1");
  
  WxCpXmlMessage message5 = new WxCpXmlMessage();
  message5.setContent("BLA");
  
  WxCpXmlMessage message6 = new WxCpXmlMessage();
  message6.setContent("abcd");

  WxCpXmlMessage message7 = new WxCpXmlMessage();
  message7.setFormat("strangeformat");

  WxCpXmlMessage c2 = new WxCpXmlMessage();
  c2.setMsgType(WxConsts.XML_MSG_TEXT);
  c2.setEvent(WxConsts.EVT_CLICK);
  
  WxCpXmlMessage c3 = new WxCpXmlMessage();
  c3.setMsgType(WxConsts.XML_MSG_TEXT);
  c3.setEvent(WxConsts.EVT_CLICK);
  c3.setEventKey("KEY_1");
  
  WxCpXmlMessage c4 = new WxCpXmlMessage();
  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," }
  };
  
}
 
Example 2
Source File: WxMpMessageRouterTest.java    From weixin-java-tools with Apache License 2.0 4 votes vote down vote up
@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," }
  };
  
}