package com.flightfeather.uav.biz.dataprocess
|
|
import com.flightfeather.uav.common.exception.BizException
|
import com.flightfeather.uav.domain.entity.Mission
|
import com.flightfeather.uav.domain.repository.MissionRep
|
import org.junit.Test
|
|
import org.junit.Assert.*
|
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
|
class RoadSegmentTest {
|
|
@Autowired
|
lateinit var roadSegment: RoadSegment
|
|
@Autowired
|
lateinit var missionRep: MissionRep
|
|
@Test
|
fun handle() {
|
val mission = missionRep.findOne("SH-CN-20240830(jingan)") ?: throw BizException("任务不存在")
|
roadSegment.handle(mission)
|
// val missionList = missionRep.findList(Mission().apply {
|
// districtName = "长宁区"
|
// })
|
// missionList.forEach {
|
// it?.let {
|
// if (it.missionCode != "SH-CN-20240514") {
|
// roadSegment.handle(it)
|
// }
|
// }
|
// }
|
}
|
}
|