Skip to content

Commit bf26d37

Browse files
Copilotbinarywang
andcommitted
改进代码可读性:使用import导入类而非完全限定名
Co-authored-by: binarywang <[email protected]>
1 parent 30608d2 commit bf26d37

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package me.chanjar.weixin.cp.api.impl;
22

3+
import com.google.gson.JsonArray;
34
import com.google.gson.JsonObject;
45
import com.google.inject.Inject;
56
import me.chanjar.weixin.common.error.WxErrorException;
67
import me.chanjar.weixin.cp.api.ApiTestModule;
78
import me.chanjar.weixin.cp.api.WxCpAgentService;
89
import me.chanjar.weixin.cp.api.WxCpService;
910
import me.chanjar.weixin.cp.bean.WxCpAgent;
11+
import me.chanjar.weixin.cp.bean.WxCpTpAdmin;
1012
import me.chanjar.weixin.cp.config.WxCpConfigStorage;
1113
import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
1214
import me.chanjar.weixin.cp.constant.WxCpApiPathConsts;
@@ -91,7 +93,7 @@ public void testList() throws WxErrorException {
9193
@Test
9294
public void testGetAdminList() throws WxErrorException {
9395
final Integer agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
94-
me.chanjar.weixin.cp.bean.WxCpTpAdmin adminList = this.wxCpService.getAgentService().getAdminList(agentId);
96+
WxCpTpAdmin adminList = this.wxCpService.getAgentService().getAdminList(agentId);
9597

9698
assertThat(adminList).isNotNull();
9799
assertThat(adminList.getErrcode()).isEqualTo(0L);
@@ -151,7 +153,7 @@ public void testGetAdminList() throws Exception {
151153
admin2.addProperty("open_userid", "woAJ2GCAAAXtWyujaWJHDDGi0mACH72w");
152154
admin2.addProperty("auth_type", 2);
153155

154-
com.google.gson.JsonArray adminArray = new com.google.gson.JsonArray();
156+
JsonArray adminArray = new JsonArray();
155157
adminArray.add(admin1);
156158
adminArray.add(admin2);
157159

@@ -169,7 +171,7 @@ public void testGetAdminList() throws Exception {
169171
when(wxService.getAgentService()).thenReturn(new WxCpAgentServiceImpl(wxService));
170172

171173
WxCpAgentService wxAgentService = this.wxService.getAgentService();
172-
me.chanjar.weixin.cp.bean.WxCpTpAdmin adminList = wxAgentService.getAdminList(9);
174+
WxCpTpAdmin adminList = wxAgentService.getAdminList(9);
173175

174176
assertEquals(0, adminList.getErrcode().intValue());
175177
assertEquals(2, adminList.getAdmin().size());

0 commit comments

Comments
 (0)