admin
2021-03-24 c44a4296e8913080bff7ca0ee1b65356ed34ec3d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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();
        }
    }
 
 
}