소스 검색

添加缺失的单元测试

master
BinaryWang 8 년 전
부모
커밋
10ce6a8920
1개의 변경된 파일13개의 추가작업 그리고 7개의 파일을 삭제
  1. +13
    -7
      weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/impl/WxMpUserTagServiceImplTest.java

+ 13
- 7
weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/impl/WxMpUserTagServiceImplTest.java 파일 보기

@@ -1,17 +1,15 @@
package me.chanjar.weixin.mp.api.impl;

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.api.WxXmlMpInMemoryConfigStorage;
import me.chanjar.weixin.mp.bean.tag.WxTagListUser;
import me.chanjar.weixin.mp.bean.tag.WxUserTag;
import org.testng.Assert;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;

import java.util.List;

/**
*
@@ -64,6 +62,14 @@ public class WxMpUserTagServiceImplTest {
Assert.assertNotNull(res);
}

@Test
public void testBatchTagging() throws Exception {
String[] openids = new String[]{((WxXmlMpInMemoryConfigStorage) this.wxService.getWxMpConfigStorage()).getOpenid()};
boolean res = this.wxService.getUserTagService().batchTagging(this.tagId, openids);
System.out.println(res);
Assert.assertTrue(res);
}

@Test
public void testBatchUntagging() throws Exception {
String[] openids = new String[]{((WxXmlMpInMemoryConfigStorage) this.wxService.getWxMpConfigStorage()).getOpenid()};


불러오는 중...
취소
저장