🆕 #2373 【小程序】urllink生成接口增加env_version参数以支持环境隔离
This commit is contained in:
@@ -5,12 +5,14 @@ import cn.binarywang.wx.miniapp.bean.shortlink.GenerateShortLinkRequest;
|
||||
import cn.binarywang.wx.miniapp.bean.urllink.GenerateUrlLinkRequest;
|
||||
import cn.binarywang.wx.miniapp.test.ApiTestModule;
|
||||
import com.google.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import org.testng.annotations.Guice;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@Test
|
||||
@Guice(modules = ApiTestModule.class)
|
||||
@Slf4j
|
||||
public class WxMaLinkServiceImplTest {
|
||||
@Inject
|
||||
private WxMaService wxMaService;
|
||||
@@ -34,4 +36,17 @@ public class WxMaLinkServiceImplTest {
|
||||
System.out.println("generate:");
|
||||
System.out.println(generate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 多版本链接生成测试
|
||||
* 开发时,仅支持IOS设备打开体验版及开发版
|
||||
*/
|
||||
@Test
|
||||
public void testGenerateMultiEnvUrlLink() throws WxErrorException {
|
||||
String url = this.wxMaService.getLinkService().generateUrlLink(GenerateUrlLinkRequest.builder()
|
||||
.path("")
|
||||
.envVersion("trial")
|
||||
.build());
|
||||
log.info("generate url link = {}", url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user