提取公共代码、实现okhttp请求方式 (#199)
1、提取了公共代码,添加AbstractWxMPService、AbstractWxCPService类 2、实现了okhttp请求方式
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user