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