1
0
mirror of synced 2025-12-22 00:48:00 +08:00

issue #1 添加分组管理接口-查询用户所在分组

This commit is contained in:
Daniel Qian
2014-08-25 19:32:24 +08:00
parent fb7e739fef
commit 74f0b44be6
5 changed files with 31 additions and 2 deletions

View File

@@ -22,10 +22,10 @@ public class WxCustomMessageAPITest {
protected WxServiceImpl wxService;
public void testSendCustomMessage() throws WxErrorException {
WxXmlConfigStorage configProvider = (WxXmlConfigStorage) wxService.wxConfigStorage;
WxXmlConfigStorage configStorage = (WxXmlConfigStorage) wxService.wxConfigStorage;
WxCustomMessage message = new WxCustomMessage();
message.setMsgtype(WxConsts.CUSTOM_MSG_TEXT);
message.setTouser(configProvider.getOpenId());
message.setTouser(configStorage.getOpenId());
message.setContent("欢迎欢迎,热烈欢迎\n换行测试\n超链接:<a href=\"http://www.baidu.com\">Hello World</a>");
wxService.customMessageSend(message);

View File

@@ -6,6 +6,7 @@ import org.testng.Assert;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import chanjarster.weixin.api.ApiTestModule.WxXmlConfigStorage;
import chanjarster.weixin.bean.WxGroup;
import chanjarster.weixin.exception.WxErrorException;
@@ -38,4 +39,10 @@ public class WxGroupAPITest {
}
}
@Test(dependsOnMethods="testGroupCreate")
public void groupQueryUserGroup() throws WxErrorException {
WxXmlConfigStorage configStorage = (WxXmlConfigStorage) wxService.wxConfigStorage;
long groupid = wxService.groupQueryUserGroup(configStorage.getOpenId());
}
}