Exemple #1
0
 @Test
 public void update() throws WeixinException {
   User user = new User("id", "name");
   user.setPartyIds(1);
   user.pushExattr("爱好", "code");
   JsonResult result = userApi.updateUser(user);
   Assert.assertEquals("updated", result.getDesc());
 }
Exemple #2
0
 @Test
 public void convert() throws WeixinException {
   String[] result = userApi.userid2openid("jinyu", 1);
   System.err.println(userApi.openid2userid(result[0]));
 }
Exemple #3
0
 @Test
 public void invite() throws WeixinException {
   userApi.inviteUser("11", null);
 }
Exemple #4
0
 @Test
 public void delete() throws WeixinException {
   JsonResult result = userApi.deleteUser("u001");
   Assert.assertEquals("deleted", result.getDesc());
 }
Exemple #5
0
 @Test
 public void list() throws WeixinException {
   List<User> userList = userApi.listUser(1, true, UserStatus.BOTH, true);
   Assert.assertFalse(userList.isEmpty());
   System.out.println(userList);
 }
Exemple #6
0
 @Test
 public void get() throws WeixinException {
   User user = userApi.getUser("jinyu");
   Assert.assertTrue(user != null);
   System.out.println(user);
 }