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