增加用户标签修改接口

This commit is contained in:
Binary Wang
2016-09-11 17:49:22 +08:00
parent 5d95f37235
commit 214661b6c6
3 changed files with 48 additions and 9 deletions

View File

@@ -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);
}
}