| | |
| | | import java.util.*; |
| | | |
| | | |
| | | @RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试 |
| | | @ContextConfiguration(locations = {"classpath:spring.xml"}) |
| | | @WebAppConfiguration |
| | | //@RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试 |
| | | //@ContextConfiguration(locations = {"classpath:spring.xml"}) |
| | | //@WebAppConfiguration |
| | | public class PPTVTest { |
| | | |
| | | @Resource |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | // List<PPTVSeries> list = PPTVApiUtil.getUpdateList(); |
| | | // System.out.println(list); |
| | | } |
| | | |
| | | @Test |
| | | public void syncVideo() { |
| | | try { |
| | | pptvVideoUpdate.syncVideo(""); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Test |
| | |
| | | |
| | | @Test |
| | | public void getApiDetail() { |
| | | PPTVApiUtil.getDetail("32159127,10215224,15326213"); |
| | | PPTVApiUtil.getDetail("9040633"); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @Test |
| | | public void addVideoInfo() { |
| | | PPTVSeries series = pptvService.getSeriesDetail("26796"); |
| | | // List<PPTVSeries> seriesList = pptvSeriesDao.list("少儿", 0, 100); |
| | | // for (PPTVSeries series : seriesList) { |
| | | PPTVSeries series = pptvService.getSeriesDetail("381472"); |
| | | pptvService.addToVideoInfo(series); |
| | | // } |
| | | } |
| | | |
| | | @Test |
| | |
| | | } |
| | | } |
| | | |
| | | // @Test |
| | | // @Test |
| | | public void getDetail(String sCode) { |
| | | PPTVSeries series = PPTVApiUtil.getDetail(sCode); |
| | | pptvService.save(series); |