代码调整
This commit is contained in:
18
pqs-influx/src/test/java/com/njcn/influx/BaseJunitTest.java
Normal file
18
pqs-influx/src/test/java/com/njcn/influx/BaseJunitTest.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.njcn.influx;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年12月10日 15:05
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@WebAppConfiguration
|
||||
@SpringBootTest(classes = PqsInfluxApplication.class)
|
||||
public class BaseJunitTest {
|
||||
|
||||
}
|
||||
38
pqs-influx/src/test/java/com/njcn/influx/DemoTest.java
Normal file
38
pqs-influx/src/test/java/com/njcn/influx/DemoTest.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package com.njcn.influx;
|
||||
|
||||
import com.njcn.influx.mapper.CldStatisticsFlowMapper;
|
||||
import com.njcn.influx.pojo.po.CldStatisFlow;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.service.DataFlickerService;
|
||||
import lombok.SneakyThrows;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年12月14日 12:55
|
||||
*/
|
||||
public class DemoTest extends BaseJunitTest {
|
||||
|
||||
|
||||
@Autowired
|
||||
private CldStatisticsFlowMapper cldStatisticsFlowMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private DataFlickerService dataFlickerService;
|
||||
|
||||
|
||||
|
||||
@SneakyThrows
|
||||
@Test
|
||||
public void test() {
|
||||
dataFlickerService.getDataFlicker("ff2d9674c1f1ecce7f33a5bf17fc4f2d","2023-05-02 00:00:00","2023-05-02 23:59:59");
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user