package com.ameya360; import com.ameya360.Task.UpdateEnergyTask; 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; import org.springframework.test.context.web.WebAppConfiguration; import java.io.IOException; @RunWith(SpringRunner.class) @SpringBootTest @WebAppConfiguration public class EnergyTest { @Autowired UpdateEnergyTask updateEnergyTask; @Test public void test() throws IOException { updateEnergyTask.task(); } }
springboot单元测试
最新推荐文章于 2024-03-17 18:30:00 发布