diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImplTest.java index bb4d3904d..0056b88f7 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImplTest.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpChatServiceImplTest.java @@ -38,24 +38,24 @@ public class WxCpChatServiceImplTest { } @Test - public void testChatCreate() throws Exception { - final String result = cpService.getChatService().chatCreate("测试群聊", userId, + public void testCreate() throws Exception { + final String result = cpService.getChatService().create("测试群聊", userId, Arrays.asList(userId, userId), chatId); assertThat(result).isNotEmpty(); assertThat(result).isEqualTo(chatId); } @Test - public void testChatGet() throws Exception { - WxCpChat chat = this.cpService.getChatService().chatGet(chatId); + public void testGet() throws Exception { + WxCpChat chat = this.cpService.getChatService().get(chatId); System.out.println(chat); Assert.assertEquals(chat.getName(), "测试群聊"); } @Test - public void testChatUpdate() throws Exception { - this.cpService.getChatService().chatUpdate(chatId, "", "", Arrays.asList("ZhengWuYao"), null); - WxCpChat chat = this.cpService.getChatService().chatGet(chatId); + public void testUpdate() throws Exception { + this.cpService.getChatService().update(chatId, "", "", Arrays.asList("ZhengWuYao"), null); + WxCpChat chat = this.cpService.getChatService().get(chatId); System.out.println(chat); Assert.assertEquals(chat.getUsers().size(), 3); } diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpGroupRobotServiceTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImplTest.java similarity index 89% rename from weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpGroupRobotServiceTest.java rename to weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImplTest.java index 126a215b7..b697efd53 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpGroupRobotServiceTest.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpGroupRobotServiceImplTest.java @@ -1,9 +1,12 @@ -package me.chanjar.weixin.cp.api; +package me.chanjar.weixin.cp.api.impl; import com.google.inject.Inject; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.util.fs.FileUtils; +import me.chanjar.weixin.cp.api.ApiTestModule; +import me.chanjar.weixin.cp.api.WxCpGroupRobotService; +import me.chanjar.weixin.cp.api.WxCpService; import me.chanjar.weixin.cp.bean.article.NewArticle; import org.testng.annotations.BeforeTest; import org.testng.annotations.Guice; @@ -23,8 +26,7 @@ import static org.testng.Assert.*; */ @Slf4j @Guice(modules = ApiTestModule.class) -public class WxCpGroupRobotServiceTest { - +public class WxCpGroupRobotServiceImplTest { @Inject protected WxCpService wxService; diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpTagServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpTagServiceImplTest.java index 8d21bf17f..7db4564f6 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpTagServiceImplTest.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpTagServiceImplTest.java @@ -40,7 +40,7 @@ public class WxCpTagServiceImplTest { @Test public void testCreate() throws Exception { - this.tagId = this.wxService.getTagService().create("测试标签" + System.currentTimeMillis()); + this.tagId = this.wxService.getTagService().create("测试标签" + System.currentTimeMillis(), null); System.out.println(this.tagId); } diff --git a/weixin-java-cp/src/test/resources/testng.xml b/weixin-java-cp/src/test/resources/testng.xml index 4b9401566..563928bdf 100644 --- a/weixin-java-cp/src/test/resources/testng.xml +++ b/weixin-java-cp/src/test/resources/testng.xml @@ -1,13 +1,12 @@ - - + + -