99import me .chanjar .weixin .mp .bean .template .WxMpTemplateData ;
1010import me .chanjar .weixin .mp .bean .template .WxMpTemplateIndustry ;
1111import me .chanjar .weixin .mp .bean .template .WxMpTemplateMessage ;
12+ import org .apache .commons .lang3 .RandomStringUtils ;
1213import org .testng .Assert ;
1314import org .testng .annotations .Guice ;
1415import org .testng .annotations .Test ;
@@ -28,7 +29,7 @@ public class WxMpTemplateMsgServiceImplTest {
2829 @ Inject
2930 protected WxMpService wxService ;
3031
31- @ Test (invocationCount = 10 , threadPoolSize = 10 )
32+ @ Test (invocationCount = 5 , threadPoolSize = 3 )
3233 public void testSendTemplateMsg () throws WxErrorException {
3334 SimpleDateFormat dateFormat = new SimpleDateFormat (
3435 "yyyy-MM-dd HH:mm:ss.SSS" );
@@ -39,6 +40,8 @@ public void testSendTemplateMsg() throws WxErrorException {
3940 .templateId (configStorage .getTemplateId ()).build ();
4041 templateMessage .addWxMpTemplateData (
4142 new WxMpTemplateData ("first" , dateFormat .format (new Date ())));
43+ templateMessage .addWxMpTemplateData (
44+ new WxMpTemplateData ("remark" , RandomStringUtils .randomAlphanumeric (100 ), "#FF00FF" ));
4245 String msgId = this .wxService .getTemplateMsgService ().sendTemplateMsg (templateMessage );
4346 Assert .assertNotNull (msgId );
4447 System .out .println (msgId );
0 commit comments