issue #1 添加分组管理接口-查询用户所在分组
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user