Skip to content

Commit 10ce6a8

Browse files
committed
添加缺失的单元测试
1 parent d9d0f54 commit 10ce6a8

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/impl/WxMpUserTagServiceImplTest.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
package me.chanjar.weixin.mp.api.impl;
22

3-
import java.util.List;
4-
5-
import org.testng.Assert;
6-
import org.testng.annotations.Guice;
7-
import org.testng.annotations.Test;
8-
93
import com.google.inject.Inject;
10-
114
import me.chanjar.weixin.mp.api.ApiTestModule;
125
import me.chanjar.weixin.mp.api.WxXmlMpInMemoryConfigStorage;
136
import me.chanjar.weixin.mp.bean.tag.WxTagListUser;
147
import me.chanjar.weixin.mp.bean.tag.WxUserTag;
8+
import org.testng.Assert;
9+
import org.testng.annotations.Guice;
10+
import org.testng.annotations.Test;
11+
12+
import java.util.List;
1513

1614
/**
1715
*
@@ -64,6 +62,14 @@ public void testTagListUser() throws Exception {
6462
Assert.assertNotNull(res);
6563
}
6664

65+
@Test
66+
public void testBatchTagging() throws Exception {
67+
String[] openids = new String[]{((WxXmlMpInMemoryConfigStorage) this.wxService.getWxMpConfigStorage()).getOpenid()};
68+
boolean res = this.wxService.getUserTagService().batchTagging(this.tagId, openids);
69+
System.out.println(res);
70+
Assert.assertTrue(res);
71+
}
72+
6773
@Test
6874
public void testBatchUntagging() throws Exception {
6975
String[] openids = new String[]{((WxXmlMpInMemoryConfigStorage) this.wxService.getWxMpConfigStorage()).getOpenid()};

0 commit comments

Comments
 (0)