ElectricFenceServiceTest.java 749 Bytes
package cn.com.glsx.admin.modules.service;

import cn.com.glsx.Application;
import lombok.extern.slf4j.Slf4j;
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;

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

    @Autowired
    private ElectricFenceService electricFenceService;

    @Test
    public void syncAddFences() throws Exception {
        electricFenceService.syncAddFences();
        Thread.sleep(100000);
    }
}