🎨 修复部分单元测试

This commit is contained in:
Binary Wang
2020-08-23 23:54:15 +08:00
parent 33b13b1bcd
commit daf0b23328
5 changed files with 4 additions and 103 deletions

View File

@@ -221,28 +221,12 @@ public abstract class BaseWxMpServiceImpl<H, P> implements WxMpService, RequestH
return WxMpSemanticQueryResult.fromJson(responseContent);
}
@Override
public String oauth2buildAuthorizationUrl(String redirectURI, String scope, String state) {
return String.format(CONNECT_OAUTH2_AUTHORIZE_URL.getUrl(this.getWxMpConfigStorage()),
this.getWxMpConfigStorage().getAppId(), URIUtil.encodeURIComponent(redirectURI), scope, StringUtils.trimToEmpty(state));
}
@Override
public String buildQrConnectUrl(String redirectUri, String scope, String state) {
return String.format(QRCONNECT_URL.getUrl(this.getWxMpConfigStorage()), this.getWxMpConfigStorage().getAppId(),
URIUtil.encodeURIComponent(redirectUri), scope, StringUtils.trimToEmpty(state));
}
private WxMpOAuth2AccessToken getOAuth2AccessToken(String url) throws WxErrorException {
try {
RequestExecutor<String, String> executor = SimpleGetRequestExecutor.create(this);
String responseText = executor.execute(url, null, WxType.MP);
return WxMpOAuth2AccessToken.fromJson(responseText);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public String[] getCallbackIP() throws WxErrorException {
String responseContent = this.get(GET_CALLBACK_IP_URL, null);