1
0
mirror of synced 2025-12-22 09:58:07 +08:00

添加门店信息查看的接口, for issue #17

This commit is contained in:
BinaryWang
2016-09-28 19:45:43 +08:00
parent 7478361824
commit 6889e3d95e
5 changed files with 63 additions and 29 deletions

View File

@@ -1,20 +1,18 @@
package me.chanjar.weixin.mp.api.impl;
import static org.junit.Assert.assertNotNull;
import java.math.BigDecimal;
import java.util.List;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import com.google.inject.Inject;
import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.mp.api.ApiTestModule;
import me.chanjar.weixin.mp.bean.store.WxMpStoreBaseInfo;
import me.chanjar.weixin.mp.bean.store.WxMpStoreInfo;
import me.chanjar.weixin.mp.bean.store.WxMpStoreListResult;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import java.math.BigDecimal;
import java.util.List;
import static org.junit.Assert.assertNotNull;
/**
* @author 王彬 (Binary Wang)
@@ -28,18 +26,23 @@ public class WxMpStoreServiceImplTest {
/**
* Test method for {@link me.chanjar.weixin.mp.api.impl.WxMpStoreServiceImpl#add(me.chanjar.weixin.mp.bean.store.WxMpStoreBaseInfo)}.
* @throws WxErrorException
* @throws WxErrorException
*/
public void testAdd() throws WxErrorException {
this.wxMpService.getStoreService()
.add(WxMpStoreBaseInfo.builder().businessName("haha").branchName("abc")
.province("aaa").district("aaa").telephone("122").address("abc")
.categories(new String[] { "美食,江浙菜" })
.province("aaa").district("aaa").telephone("122").address("abc").categories(new String[] { "美食,江浙菜" })
.longitude(new BigDecimal("115.32375"))
.latitude(new BigDecimal("25.097486")).city("aaa").offsetType(1)
.build());
}
public void testGet() throws WxErrorException {
WxMpStoreBaseInfo result = this.wxMpService.getStoreService().get("291503654");
assertNotNull(result);
System.err.println(result);
}
public void testList() throws WxErrorException {
WxMpStoreListResult result = this.wxMpService.getStoreService().list(0, 10);
assertNotNull(result);