DemoApplicationTests.java 973 Bytes
package cn.com.glsx;

import cn.com.glsx.scheduler.modules.service.RestSimpleJobService;
import cn.com.glsx.scheduler.modules.service.ShopmallGoodsDataSyncService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class DemoApplicationTests {

    @Autowired
    private RestSimpleJobService restSimpleJobService;

    @Autowired
    private ShopmallGoodsDataSyncService shopmallGoodsDataSyncService;

    @Test
    public void testJob() {
        restSimpleJobService.simpleJob("13800138000");
    }

    @Test
    public void testSyncGoodsStatusAndPriceData() {
        shopmallGoodsDataSyncService.syncGoodsStatusAndPriceData();
    }

}