1
0
mirror of synced 2025-12-19 23:08:13 +08:00

🆕 #2249 【小程序】增加自定义组件之商家入驻相关接口

This commit is contained in:
liming1019
2021-08-09 22:08:29 +08:00
committed by GitHub
parent 5c71b2a29f
commit 16d98a6142
18 changed files with 582 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopAccountUpdateInfoRequest;
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopRegisterApplySceneRequest;
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopRegisterFinishAccessInfoRequest;
import cn.binarywang.wx.miniapp.bean.shop.response.*;
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;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author liming1019
*/
@Test
@Guice(modules = ApiTestModule.class)
public class WxMaShopAccountServiceImplTest {
@Inject
private WxMaService wxService;
@Test
public void testGetCategoryList() throws WxErrorException {
WxMaShopAccountGetCategoryListResponse response = this.wxService.getShopAccountService().getCategoryList();
assertThat(response).isNotNull();
}
@Test
public void testGetBrandList() throws WxErrorException {
WxMaShopAccountGetBrandListResponse response = this.wxService.getShopAccountService().getBrandList();
assertThat(response).isNotNull();
}
@Test
public void testUpdateInfo() throws WxErrorException {
WxMaShopAccountUpdateInfoRequest request = new WxMaShopAccountUpdateInfoRequest();
request.setServiceAgentPhone("020-888888");
request.setServiceAgentPath("https://www.web.com");
WxMaShopBaseResponse response = this.wxService.getShopAccountService().updateInfo(request);
assertThat(response).isNotNull();
}
@Test
public void testGetInfo() throws WxErrorException {
WxMaShopAccountGetInfoResponse response = this.wxService.getShopAccountService().getInfo();
assertThat(response).isNotNull();
}
}

View File

@@ -0,0 +1,28 @@
package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopCatGetResponse;
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;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author liming1019
*/
@Test
@Guice(modules = ApiTestModule.class)
public class WxMaShopCatServiceImplTest {
@Inject
private WxMaService wxService;
@Test
public void testGetCat() throws WxErrorException {
WxMaShopCatGetResponse response = this.wxService.getShopCatService().getCat();
assertThat(response).isNotNull();
}
}