issue #1 添加分组管理接口-创建分组接口
This commit is contained in:
29
src/test/java/chanjarster/weixin/api/WxGroupAPITest.java
Normal file
29
src/test/java/chanjarster/weixin/api/WxGroupAPITest.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package chanjarster.weixin.api;
|
||||
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Guice;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import chanjarster.weixin.bean.WxGroup;
|
||||
import chanjarster.weixin.exception.WxErrorException;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* 测试分组接口
|
||||
*
|
||||
* @author chanjarster
|
||||
*/
|
||||
@Test(groups = "groupAPI", dependsOnGroups = "baseAPI")
|
||||
@Guice(modules = ApiTestModule.class)
|
||||
public class WxGroupAPITest {
|
||||
|
||||
@Inject
|
||||
protected WxServiceImpl wxService;
|
||||
|
||||
public void testCreateMenu() throws WxErrorException {
|
||||
WxGroup res = wxService.groupCreate("测试分组1");
|
||||
Assert.assertEquals(res.getName(), "测试分组1");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import chanjarster.weixin.exception.WxErrorException;
|
||||
* @author chanjarster
|
||||
*
|
||||
*/
|
||||
@Test(dependsOnGroups="baseAPI")
|
||||
@Test(groups="menuAPI", dependsOnGroups="baseAPI")
|
||||
@Guice(modules = ApiTestModule.class)
|
||||
public class WxMenuAPITest {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user