test: Job定義追加のテストを追加

This commit is contained in:
usbharu 2023-04-05 17:00:20 +09:00
parent bcb17b5700
commit 1e917e591f
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
package dev.usbharu.hideout.service.job
import kjob.core.Job
import org.jetbrains.exposed.sql.Database
import org.junit.jupiter.api.Test
class KJobJobWorkerServiceTest {
object TestJob : Job("test-job")
@Test
fun init() {
val kJobJobWorkerService = KJobJobWorkerService(Database.connect("jdbc:h2:mem:"))
kJobJobWorkerService.init(listOf(TestJob to { it -> execute { it as TestJob;println(it.propNames) } }))
}
}