mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-11-13 11:58:27 +08:00
增加用户标签修改接口
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
package me.chanjar.weixin.mp.api.impl;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import me.chanjar.weixin.mp.api.ApiTestModule;
|
||||
import me.chanjar.weixin.mp.bean.tag.WxUserTag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Guice;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import me.chanjar.weixin.mp.api.ApiTestModule;
|
||||
import me.chanjar.weixin.mp.bean.tag.WxUserTag;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author binarywang(https://github.com/binarywang)
|
||||
@@ -21,11 +22,14 @@ public class WxMpUserTagServiceImplTest {
|
||||
@Inject
|
||||
protected WxMpServiceImpl wxService;
|
||||
|
||||
private Integer tagId;
|
||||
|
||||
@Test
|
||||
public void testTagCreate() throws Exception {
|
||||
String tagName = "测试标签";
|
||||
String tagName = "测试标签" + System.currentTimeMillis();
|
||||
WxUserTag res = this.wxService.getUserTagService().tagCreate(tagName);
|
||||
System.out.println(res);
|
||||
this.tagId = res.getId();
|
||||
Assert.assertEquals(tagName, res.getName());
|
||||
}
|
||||
|
||||
@@ -36,4 +40,12 @@ public class WxMpUserTagServiceImplTest {
|
||||
Assert.assertNotNull(res);
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = { "testTagCreate" })
|
||||
public void testTagUpdate() throws Exception {
|
||||
String tagName = "修改标签" + System.currentTimeMillis();
|
||||
Boolean res = this.wxService.getUserTagService().tagUpdate(this.tagId, tagName);
|
||||
System.out.println(res);
|
||||
Assert.assertTrue(res);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user