@Test(dependsOnMethods = {"testUploadMedia"}, dataProvider = "downloadMedia") public void testDownloadMedia(String media_id) throws WxErrorException { File file = this.wxService.getMediaService().download(media_id); assertNotNull(file); System.out.println(file); }
@Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_id=" + mediaId); }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_id=" + mediaId); } }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_id=" + mediaId); } WxCpMediaServiceImpl(WxCpService mainService); }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_id=" + mediaId); } WxCpMediaServiceImpl(WxCpService mainService); @Override WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream); @Override WxMediaUploadResult upload(String mediaType, File file); @Override File download(String mediaId); }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File download(String mediaId) throws WxErrorException { String url = "https: return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), url, "media_id=" + mediaId); } WxCpMediaServiceImpl(WxCpService mainService); @Override WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream); @Override WxMediaUploadResult upload(String mediaType, File file); @Override File download(String mediaId);  }