#520 企业微信网页授权增加使用user_ticket获取成员详情的接口
This commit is contained in:
@@ -56,7 +56,7 @@ public class WxCpDepartmentServiceImplTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = {"testListAll", "testCreate"})
|
||||
@Test(dependsOnMethods = {"testList", "testCreate"})
|
||||
public void testUpdate() throws Exception {
|
||||
System.out.println("=================更新部门");
|
||||
this.depart.setName("子部门改名" + System.currentTimeMillis());
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package me.chanjar.weixin.cp.api.impl;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import me.chanjar.weixin.common.exception.WxErrorException;
|
||||
import me.chanjar.weixin.cp.api.ApiTestModule;
|
||||
import me.chanjar.weixin.cp.api.WxCpService;
|
||||
import me.chanjar.weixin.cp.bean.WxCpUserDetail;
|
||||
import org.testng.annotations.Guice;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Created by BinaryWang on 2018/4/22.
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
@Guice(modules = ApiTestModule.class)
|
||||
public class WxCpOAuth2ServiceImplTest {
|
||||
@Inject
|
||||
private WxCpService wxService;
|
||||
|
||||
@Test
|
||||
public void testGetUserDetail() throws WxErrorException {
|
||||
WxCpUserDetail userDetail = this.wxService.getOauth2Service().getUserDetail("b");
|
||||
System.out.println(userDetail);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetUserInfo() throws WxErrorException {
|
||||
this.wxService.getOauth2Service().getUserInfo("abc");
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package me.chanjar.weixin.cp.api.impl;
|
||||
import com.google.inject.Inject;
|
||||
import me.chanjar.weixin.cp.api.ApiTestModule;
|
||||
import me.chanjar.weixin.cp.api.WxCpService;
|
||||
import me.chanjar.weixin.cp.bean.Gender;
|
||||
import me.chanjar.weixin.cp.bean.WxCpUser;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
@@ -40,7 +41,7 @@ public class WxCpUserServiceImplTest {
|
||||
user.setName("Some Woman");
|
||||
user.setDepartIds(new Integer[]{2});
|
||||
user.setEmail("none@none.com");
|
||||
user.setGender(WxCpUser.Gender.FEMALE);
|
||||
user.setGender(Gender.FEMALE);
|
||||
user.setMobile("13560084979");
|
||||
user.setPosition("woman");
|
||||
user.setTelephone("3300393");
|
||||
|
||||
Reference in New Issue
Block a user