From f60a7d911b4f25360c75c315569104243e169418 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sun, 22 Dec 2019 16:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E9=83=A8=E5=88=86=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mp/api/impl/WxMpMarketingServiceImplTest.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/impl/WxMpMarketingServiceImplTest.java b/weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/impl/WxMpMarketingServiceImplTest.java index 900453b66..3d1b74e6c 100644 --- a/weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/impl/WxMpMarketingServiceImplTest.java +++ b/weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/impl/WxMpMarketingServiceImplTest.java @@ -1,5 +1,12 @@ package me.chanjar.weixin.mp.api.impl; +import com.google.common.collect.Lists; +import com.google.inject.Inject; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.mp.api.WxMpService; +import me.chanjar.weixin.mp.api.test.ApiTestModule; +import me.chanjar.weixin.mp.bean.marketing.WxMpUserAction; +import org.testng.annotations.Guice; import org.testng.annotations.Test; import static org.testng.Assert.*; @@ -10,7 +17,11 @@ import static org.testng.Assert.*; * @author Binary Wang * @date 2019-07-14 */ +@Test +@Guice(modules = ApiTestModule.class) public class WxMpMarketingServiceImplTest { + @Inject + protected WxMpService wxService; @Test public void testAddUserActionSets() { @@ -21,7 +32,8 @@ public class WxMpMarketingServiceImplTest { } @Test - public void testAddUserAction() { + public void testAddUserAction() throws WxErrorException { + this.wxService.getMarketingService().addUserAction(Lists.newArrayList(new WxMpUserAction())); } @Test