예제 #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());
 }
예제 #2
0
 @Test
 public void convert() throws WeixinException {
   String[] result = userApi.userid2openid("jinyu", 1);
   System.err.println(userApi.openid2userid(result[0]));
 }
예제 #3
0
 @Test
 public void invite() throws WeixinException {
   userApi.inviteUser("11", null);
 }
예제 #4
0
 @Test
 public void delete() throws WeixinException {
   JsonResult result = userApi.deleteUser("u001");
   Assert.assertEquals("deleted", result.getDesc());
 }
예제 #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);
 }
예제 #6
0
 @Test
 public void get() throws WeixinException {
   User user = userApi.getUser("jinyu");
   Assert.assertTrue(user != null);
   System.out.println(user);
 }