1
0
mirror of synced 2025-12-19 06:37:59 +08:00

🆕 #2306【微信小程序】增加小程序Short Link生成的接口

This commit is contained in:
linlinjava
2021-09-10 11:38:35 +08:00
committed by GitHub
parent 3c267bbe61
commit ea31b7bfbe
7 changed files with 134 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.shortlink.GenerateShortLinkRequest;
import cn.binarywang.wx.miniapp.test.ApiTestModule;
import com.google.inject.Inject;
import me.chanjar.weixin.common.error.WxErrorException;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@Test
@Guice(modules = ApiTestModule.class)
public class WxMaShortLinkServiceImplTest {
@Inject
private WxMaService wxService;
@Test
public void testGenerate() throws WxErrorException {
final String generate = this.wxService.getShortLinkService().generate(GenerateShortLinkRequest.builder().
pageUrl("pages/productView/editPhone/editPhone?id=31832").pageTitle("productView").isPermanent(false).build());
System.out.println("generate:");
System.out.println(generate);
}
}