package com.hxh.spring.test.video;
|
|
|
import com.yeshi.buwan.job.video.YouKuVideoUpdate;
|
import org.junit.Test;
|
import org.junit.runner.RunWith;
|
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.web.WebAppConfiguration;
|
|
import javax.annotation.Resource;
|
|
@RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试
|
@ContextConfiguration(locations = {"classpath:spring.xml"})
|
@WebAppConfiguration
|
public class YouKuTest {
|
|
@Resource
|
private YouKuVideoUpdate youKuVideoUpdate;
|
|
@Test
|
public void test1() {
|
try {
|
youKuVideoUpdate.updateLatestVideo("动漫");
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
}
|
|
|
}
|