1
0
mirror of synced 2025-12-21 16:38:01 +08:00

添加接口分析数据接口

This commit is contained in:
BinaryWang
2016-08-30 19:52:03 +08:00
parent 4a994ea4c3
commit af9bfa2156
4 changed files with 173 additions and 15 deletions

View File

@@ -1,25 +1,26 @@
package me.chanjar.weixin.mp.api.impl;
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.datacube.WxDataCubeArticleResult;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeArticleTotal;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeMsgResult;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserCumulate;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserSummary;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import static org.junit.Assert.fail;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
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.datacube.WxDataCubeArticleResult;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeArticleTotal;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeInterfaceResult;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeMsgResult;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserCumulate;
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserSummary;
/**
* 测试统计分析相关的接口
* Created by Binary Wang on 2016/8/23.
@@ -194,4 +195,20 @@ public class WxMpDataCubeServiceImplTest {
Assert.assertNotNull(results);
System.out.println(results);
}
@Test(dataProvider = "thirtyDays")
public void testGetInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException {
List<WxDataCubeInterfaceResult> results = this.wxService.getDataCubeService()
.getInterfaceSummary(beginDate, endDate);
Assert.assertNotNull(results);
System.out.println(results);
}
@Test(dataProvider = "oneDay")
public void testGetInterfaceSummaryHour(Date date) throws WxErrorException {
List<WxDataCubeInterfaceResult> results = this.wxService.getDataCubeService()
.getInterfaceSummaryHour(date, date);
Assert.assertNotNull(results);
System.out.println(results);
}
}