|
1 | 1 | package me.chanjar.weixin.mp.api.impl; |
2 | 2 |
|
| 3 | +import java.text.ParseException; |
| 4 | +import java.text.SimpleDateFormat; |
| 5 | +import java.util.Date; |
| 6 | +import java.util.List; |
| 7 | + |
| 8 | +import org.testng.Assert; |
| 9 | +import org.testng.annotations.DataProvider; |
| 10 | +import org.testng.annotations.Guice; |
| 11 | +import org.testng.annotations.Test; |
| 12 | + |
3 | 13 | import com.google.inject.Inject; |
| 14 | + |
4 | 15 | import me.chanjar.weixin.common.exception.WxErrorException; |
5 | 16 | import me.chanjar.weixin.mp.api.ApiTestModule; |
6 | 17 | import me.chanjar.weixin.mp.bean.datacube.WxDataCubeArticleResult; |
7 | 18 | import me.chanjar.weixin.mp.bean.datacube.WxDataCubeArticleTotal; |
| 19 | +import me.chanjar.weixin.mp.bean.datacube.WxDataCubeInterfaceResult; |
8 | 20 | import me.chanjar.weixin.mp.bean.datacube.WxDataCubeMsgResult; |
9 | 21 | import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserCumulate; |
10 | 22 | import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserSummary; |
11 | | -import org.testng.Assert; |
12 | | -import org.testng.annotations.DataProvider; |
13 | | -import org.testng.annotations.Guice; |
14 | | -import org.testng.annotations.Test; |
15 | | - |
16 | | -import static org.junit.Assert.fail; |
17 | | - |
18 | | -import java.text.ParseException; |
19 | | -import java.text.SimpleDateFormat; |
20 | | -import java.util.Date; |
21 | | -import java.util.List; |
22 | 23 |
|
23 | 24 | /** |
24 | 25 | * 测试统计分析相关的接口 |
@@ -194,4 +195,20 @@ public void testGetUpstreamMsgDistMonth(Date beginDate, Date endDate) throws WxE |
194 | 195 | Assert.assertNotNull(results); |
195 | 196 | System.out.println(results); |
196 | 197 | } |
| 198 | + |
| 199 | + @Test(dataProvider = "thirtyDays") |
| 200 | + public void testGetInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException { |
| 201 | + List<WxDataCubeInterfaceResult> results = this.wxService.getDataCubeService() |
| 202 | + .getInterfaceSummary(beginDate, endDate); |
| 203 | + Assert.assertNotNull(results); |
| 204 | + System.out.println(results); |
| 205 | + } |
| 206 | + |
| 207 | + @Test(dataProvider = "oneDay") |
| 208 | + public void testGetInterfaceSummaryHour(Date date) throws WxErrorException { |
| 209 | + List<WxDataCubeInterfaceResult> results = this.wxService.getDataCubeService() |
| 210 | + .getInterfaceSummaryHour(date, date); |
| 211 | + Assert.assertNotNull(results); |
| 212 | + System.out.println(results); |
| 213 | + } |
197 | 214 | } |
0 commit comments