1
0
mirror of synced 2025-12-28 22:31:14 +08:00

提取公共代码、实现okhttp请求方式 (#199)

1、提取了公共代码,添加AbstractWxMPService、AbstractWxCPService类
2、实现了okhttp请求方式
This commit is contained in:
crskyp
2017-04-27 23:16:10 +08:00
committed by Binary Wang
parent 2029cd0bb7
commit 48d6f10cb2
32 changed files with 2204 additions and 2453 deletions

View File

@@ -22,7 +22,7 @@ public class WxCpBaseAPITest {
protected WxCpServiceImpl wxService;
public void testRefreshAccessToken() throws WxErrorException {
WxCpConfigStorage configStorage = this.wxService.configStorage;
WxCpConfigStorage configStorage = this.wxService.getWxCpConfigStorage();
String before = configStorage.getAccessToken();
this.wxService.getAccessToken(false);

View File

@@ -21,7 +21,7 @@ public class WxCpMessageAPITest {
protected WxCpServiceImpl wxService;
public void testSendCustomMessage() throws WxErrorException {
ApiTestModule.WxXmlCpInMemoryConfigStorage configStorage = (ApiTestModule.WxXmlCpInMemoryConfigStorage) this.wxService.configStorage;
ApiTestModule.WxXmlCpInMemoryConfigStorage configStorage = (ApiTestModule.WxXmlCpInMemoryConfigStorage) this.wxService.getWxCpConfigStorage();
WxCpMessage message1 = new WxCpMessage();
message1.setAgentId(configStorage.getAgentId());
message1.setMsgType(WxConsts.CUSTOM_MSG_TEXT);