package cn.flightfeather.supervision
|
|
|
import cn.flightfeather.supervision.domain.mapper.ParticipantMapper
|
import cn.flightfeather.supervision.lightshare.service.DeviceService
|
import org.junit.Test
|
import org.junit.jupiter.api.extension.ExtendWith
|
import org.junit.runner.RunWith
|
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.boot.test.context.SpringBootTest
|
import org.springframework.test.context.junit.jupiter.SpringExtension
|
import org.springframework.test.context.junit4.SpringRunner
|
|
@RunWith(SpringRunner::class)
|
@ExtendWith(SpringExtension::class)
|
@SpringBootTest
|
class SupervisionApplicationTests {
|
|
@Autowired
|
private lateinit var participantMapper: ParticipantMapper
|
|
@Autowired
|
private lateinit var deviceService: DeviceService
|
|
@Test
|
fun contextLoads() {
|
|
}
|
|
// @Test
|
// @Throws(Exception::class)
|
// fun test1() {
|
// //manager.startServer(args[0]);
|
// val uuid = UUIDGenerator.generateUUID(4)
|
// print(uuid)
|
// }
|
//
|
// @Test
|
// fun foo1() {
|
// val json = "{\"msgType\": 1, \"msgVoList\": [{\"time\": 2019-11-12}, {\"time\": 2019-11-13}]}"
|
// val m = GsonJsonParser().parseMap(json)
|
// }
|
//
|
// @Test
|
// fun foo2() {
|
// val r = participantMapper.selectAsUserInfo("qwDEAdhNPvQh0yEp", "BfKQclliGvfKc91i")
|
// println(r)
|
// }
|
//
|
// @org.junit.Test
|
// fun fetchData() {
|
// fetchController.run()
|
//// val read = BufferedReader(InputStreamReader(System.`in`))
|
//// val s = read.readLine()
|
// }
|
|
@Test
|
fun foo3() {
|
val l = deviceService.getLatestHourValue("nVMiV6i1UvLqahOc")
|
println(l)
|
}
|
|
}
|