优化方法名

This commit is contained in:
Binary Wang 2019-04-15 14:17:42 +08:00
parent e92e417a14
commit cab663629a
3 changed files with 4 additions and 4 deletions

View File

@ -347,7 +347,7 @@ public interface WxMpService {
* @param mpId 公众号标识
* @return 切换成功则返回当前对象方便链式调用否则抛出异常
*/
WxMpService switchover1(String mpId);
WxMpService switchoverTo(String mpId);
/**
* 返回客服接口方法实现类以方便调用其各个接口.

View File

@ -377,7 +377,7 @@ public abstract class BaseWxMpServiceImpl<H, P> implements WxMpService, RequestH
}
@Override
public WxMpService switchover1(String mpId) {
public WxMpService switchoverTo(String mpId) {
if (this.configStorageMap.containsKey(mpId)) {
WxMpConfigStorageHolder.set(mpId);
return this;

View File

@ -33,8 +33,8 @@ public class BaseWxMpServiceImplTest {
}
@Test
public void testSwitchover1() throws WxErrorException {
assertThat(this.wxService.switchover1("another").getAccessToken()).isNotEmpty();
public void testSwitchoverTo() throws WxErrorException {
assertThat(this.wxService.switchoverTo("another").getAccessToken()).isNotEmpty();
assertThat(WxMpConfigStorageHolder.get()).isEqualTo("another");
}
}