1
0
mirror of synced 2025-12-20 23:58:05 +08:00

🆕 #2373 【小程序】urllink生成接口增加env_version参数以支持环境隔离

This commit is contained in:
杨镇涛
2021-11-08 21:00:55 +08:00
committed by GitHub
parent bb6bec04b1
commit def6856b02
2 changed files with 28 additions and 1 deletions

View File

@@ -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);
}
}