1
0
mirror of synced 2025-12-19 14:48:02 +08:00

🆕 #2252 【小程序】增加自定义组件之图片上传接口

This commit is contained in:
liming1019
2021-08-11 09:49:32 +08:00
committed by GitHub
parent 24bde9298c
commit e9c1cda356
12 changed files with 338 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.test.ApiTestModule;
import com.google.inject.Inject;
import me.chanjar.weixin.common.bean.result.WxMinishopImageUploadCustomizeResult;
import me.chanjar.weixin.common.error.WxErrorException;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import java.io.File;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author liming1019
*/
@Test
@Guice(modules = ApiTestModule.class)
public class WxMaShopImgServiceImplTest {
@Inject
private WxMaService wxService;
@Test
public void testUploadImg() throws WxErrorException {
File file = new File("/Users/liming/Desktop/test.jpeg");
WxMinishopImageUploadCustomizeResult result = wxService.getShopImgService().uploadImg(file);
assertThat(result).isNotNull();
}
}