1
1
package me .chanjar .weixin .mp .api .impl ;
2
2
3
+ import java .io .File ;
4
+ import java .io .IOException ;
5
+ import java .io .InputStream ;
6
+ import java .util .ArrayList ;
7
+ import java .util .HashMap ;
8
+ import java .util .Iterator ;
9
+ import java .util .LinkedHashMap ;
10
+ import java .util .List ;
11
+ import java .util .Map ;
12
+ import java .util .UUID ;
13
+
14
+ import org .apache .commons .io .IOUtils ;
15
+ import org .testng .Assert ;
16
+ import org .testng .annotations .DataProvider ;
17
+ import org .testng .annotations .Guice ;
18
+ import org .testng .annotations .Test ;
19
+
3
20
import com .google .inject .Inject ;
21
+
4
22
import me .chanjar .weixin .common .api .WxConsts ;
5
23
import me .chanjar .weixin .common .bean .result .WxMediaUploadResult ;
6
24
import me .chanjar .weixin .common .exception .WxErrorException ;
9
27
import me .chanjar .weixin .mp .bean .WxMpMaterial ;
10
28
import me .chanjar .weixin .mp .bean .WxMpMaterialArticleUpdate ;
11
29
import me .chanjar .weixin .mp .bean .WxMpMaterialNews ;
12
- import me .chanjar .weixin .mp .bean .result .*;
13
- import org .apache .commons .io .IOUtils ;
14
- import org .testng .Assert ;
15
- import org .testng .annotations .DataProvider ;
16
- import org .testng .annotations .Guice ;
17
- import org .testng .annotations .Test ;
18
-
19
- import java .io .File ;
20
- import java .io .IOException ;
21
- import java .io .InputStream ;
22
- import java .util .*;
30
+ import me .chanjar .weixin .mp .bean .result .WxMpMaterialCountResult ;
31
+ import me .chanjar .weixin .mp .bean .result .WxMpMaterialFileBatchGetResult ;
32
+ import me .chanjar .weixin .mp .bean .result .WxMpMaterialNewsBatchGetResult ;
33
+ import me .chanjar .weixin .mp .bean .result .WxMpMaterialUploadResult ;
34
+ import me .chanjar .weixin .mp .bean .result .WxMpMaterialVideoInfoResult ;
23
35
24
36
/**
25
37
* 素材管理相关接口的测试
@@ -199,6 +211,7 @@ public void testUpdateNewsInfo() throws WxErrorException {
199
211
@ Test (dependsOnMethods = {"testUpdateNewsInfo" })
200
212
public void testMaterialNewsList () throws WxErrorException {
201
213
WxMpMaterialNewsBatchGetResult wxMpMaterialNewsBatchGetResult = this .wxService .getMaterialService ().materialNewsBatchGet (0 , 20 );
214
+ Assert .assertNotNull (wxMpMaterialNewsBatchGetResult );
202
215
return ;
203
216
}
204
217
@@ -207,6 +220,10 @@ public void testMaterialFileList() throws WxErrorException {
207
220
WxMpMaterialFileBatchGetResult wxMpMaterialVoiceBatchGetResult = this .wxService .getMaterialService ().materialFileBatchGet (WxConsts .MATERIAL_VOICE , 0 , 20 );
208
221
WxMpMaterialFileBatchGetResult wxMpMaterialVideoBatchGetResult = this .wxService .getMaterialService ().materialFileBatchGet (WxConsts .MATERIAL_VIDEO , 0 , 20 );
209
222
WxMpMaterialFileBatchGetResult wxMpMaterialImageBatchGetResult = this .wxService .getMaterialService ().materialFileBatchGet (WxConsts .MATERIAL_IMAGE , 0 , 20 );
223
+
224
+ Assert .assertNotNull (wxMpMaterialVoiceBatchGetResult );
225
+ Assert .assertNotNull (wxMpMaterialVideoBatchGetResult );
226
+ Assert .assertNotNull (wxMpMaterialImageBatchGetResult );
210
227
return ;
211
228
}
212
229
0 commit comments