1
0
mirror of synced 2025-12-20 07:38:27 +08:00

#659 小程序增加上报用户数据后台接口

This commit is contained in:
Binary Wang
2018-07-11 23:30:56 +08:00
parent 0678e22e4e
commit 4289bd5350
5 changed files with 113 additions and 29 deletions

View File

@@ -1,5 +1,9 @@
package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.test.TestConfig;
import com.google.common.collect.ImmutableMap;
import jdk.nashorn.internal.ir.annotations.Immutable;
import me.chanjar.weixin.common.error.WxErrorException;
import org.testng.annotations.*;
import cn.binarywang.wx.miniapp.api.WxMaService;
@@ -8,6 +12,8 @@ import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
import cn.binarywang.wx.miniapp.test.ApiTestModule;
import com.google.inject.Inject;
import javax.management.ImmutableDescriptor;
import static org.testng.Assert.*;
/**
@@ -54,4 +60,17 @@ public class WxMaUserServiceImplTest {
assertNotNull(phoneNoInfo);
System.out.println(phoneNoInfo.toString());
}
@Test
public void testGetSessionInfo() {
}
/**
* TODO 测试数据有问题,需要替换为正确的数据
*/
@Test
public void testSetUserStorage() throws WxErrorException {
this.wxService.getUserService().setUserStorage(ImmutableMap.of("1","2"),
"r7BXXKkLb8qrSNn05n0qiA",((TestConfig)this.wxService.getWxMaConfig()).getOpenid());
}
}