| | |
| | | import java.io.InputStreamReader; |
| | | |
| | | import com.yeshi.buwan.domain.AcFunTemporary; |
| | | import com.yeshi.buwan.job.VideoUpdateJob; |
| | | import com.yeshi.buwan.job.JuHeVideoUpdateJob; |
| | | import com.yeshi.buwan.service.imp.AcFunTemporaryService; |
| | | import com.yeshi.buwan.util.BeanUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | 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 AcfunTest { |
| | | |
| | | @Resource |
| | | private JuHeVideoUpdateJob juHeVideoUpdateJob; |
| | | |
| | | @org.junit.Test |
| | | public void test1() { |
| | | VideoUpdateJob videoUpdateJob = BeanUtil.getBean(VideoUpdateJob.class); |
| | | videoUpdateJob.updateAcFun(); |
| | | juHeVideoUpdateJob.updateAcFun(); |
| | | } |
| | | |
| | | @org.junit.Test |