예제 #1
0
 @Test
 public void list() throws WeixinException {
   List<Tag> tags = tagApi.listTag();
   Assert.assertFalse(tags.isEmpty());
   System.out.println(tags);
 }
예제 #2
0
 @Test
 public void delete() throws WeixinException {
   JsonResult result = tagApi.deleteTag(3);
   Assert.assertEquals("deleted", result.getDesc());
 }
예제 #3
0
 @Test
 public void deleteUsers() throws WeixinException {
   IdParameter result = tagApi.deleteTagUsers(1, Arrays.asList("jinyu"), null);
   Assert.assertEquals("ok", result.getUserIds().isEmpty());
   System.out.println(result);
 }
예제 #4
0
 @Test
 public void addUsers() throws WeixinException {
   IdParameter result = tagApi.addTagUsers(1, Arrays.asList("jinyu"), null);
   Assert.assertEquals("ok", result.getUserIds().isEmpty());
 }
예제 #5
0
 @Test
 public void getUsers() throws WeixinException {
   Contacts contacts = tagApi.getTagUsers(1);
   System.out.println(contacts);
 }
예제 #6
0
 @Test
 public void update() throws WeixinException {
   JsonResult result = tagApi.updateTag(new Tag(1, "coder456"));
   Assert.assertEquals("updated", result.getDesc());
 }
예제 #7
0
 @Test
 public void create() throws WeixinException {
   int tagId = tagApi.createTag(new Tag("coder"));
   Assert.assertTrue(tagId > 0);
 }