1
0
mirror of synced 2025-12-25 12:08:00 +08:00

🆕 #1686 微信公众号增加对话能力(原导购助手)部分接口,如修改顾问、删除顾问、获取顾问列表等

This commit is contained in:
Binary Wang
2020-10-07 20:00:59 +08:00
parent 6948044ab9
commit 9c91aeba6e
7 changed files with 143 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ 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.guide.WxMpGuideInfo;
import me.chanjar.weixin.mp.bean.guide.WxMpGuideList;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -23,17 +24,33 @@ public class WxMpGuideServiceImplTest {
@Test
public void testAddGuide() throws WxErrorException {
this.wxService.getGuideService().addGuide("abc", "", null, null);
this.wxService.getGuideService().addGuide("wx1java", "", null, null);
}
@Test
public void testAddGuide_another() throws WxErrorException {
this.wxService.getGuideService().addGuide(WxMpGuideInfo.builder().account("cde").build());
this.wxService.getGuideService().addGuide(WxMpGuideInfo.builder().account("wx1java").build());
}
@Test
public void testGetGuide() throws WxErrorException {
final WxMpGuideInfo guideInfo = this.wxService.getGuideService().getGuide("abc", null);
final WxMpGuideInfo guideInfo = this.wxService.getGuideService().getGuide("wx1java", null);
assertThat(guideInfo).isNotNull();
}
@Test
public void testUpdateGuide() throws WxErrorException {
this.wxService.getGuideService().updateGuide(WxMpGuideInfo.builder().account("wx1java").nickName("我是谁").build());
}
@Test
public void testDelGuide() throws WxErrorException {
this.wxService.getGuideService().delGuide("wx1java", null);
}
@Test
public void testListGuide() throws WxErrorException {
final WxMpGuideList guideList = this.wxService.getGuideService().listGuide(0, 10);
assertThat(guideList).isNotNull();
}
}